Serializable
, Cloneable
, Iterable
, Collection
, List
, RandomAccess
public class NodeList extends ArrayList
Node
which provides some XPath like helper methods for GPath.modCount
Constructor | Description |
---|---|
NodeList() |
|
NodeList(int size) |
|
NodeList(Collection collection) |
Modifier and Type | Method | Description |
---|---|---|
Object |
clone() |
Creates a new NodeList containing the same elements as the
original (but cloned in the case of Nodes).
|
NodeList |
getAt(QName name) |
Provides lookup of elements by QName.
|
NodeList |
getAt(String name) |
Provides lookup of elements by non-namespaced name.
|
void |
plus(Closure c) |
|
Node |
replaceNode(Closure c) |
|
protected static void |
setMetaClass(Class nodelistClass,
MetaClass metaClass) |
|
String |
text() |
Returns the text value of all of the elements in the collection.
|
containsAll, toString
equals, hashCode
add, add, addAll, addAll, clear, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
parallelStream, stream
containsAll, equals, hashCode
public NodeList()
public NodeList(Collection collection)
public NodeList(int size)
public Object clone()
public NodeList getAt(String name)
name
- the name or shortcut key for nodes of interestpublic NodeList getAt(QName name)
name
- the name or shortcut key for nodes of interestpublic String text()
public void plus(Closure c)