public class Elements extends ArrayList<Element>
modCount| 构造器和说明 |
|---|
Elements() |
Elements(Collection<Element> elements) |
Elements(Element... elements) |
Elements(int initialCapacity) |
Elements(List<Element> elements) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
attr(String attributeKey)
获取属性
|
List<String> |
eachAttr(String attributeKey)
获取集合内的所有该元素属性
|
List<String> |
eachText()
获取集合内的所有元素的文本
|
Element |
first()
返回集合的第一个元素
|
boolean |
hasAttr(String attributeKey)
是否存在属性
|
Element |
last()
返回集合的最后一个元素
|
Elements |
remove() |
String |
tagName()
返回集合第一个标签的标签名
|
String |
text()
获取文本元素
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringcontainsAll, equals, hashCodeparallelStream, streampublic Elements()
public Elements(int initialCapacity)
public Elements(Collection<Element> elements)
public Elements(Element... elements)
Copyright © 2021. All rights reserved.