Class NodeListImpl
- All Implemented Interfaces:
Iterable<Node>
,Collection<Node>
,List<Node>
,SequencedCollection<Node>
,NodeList
,ScriptableDelegate
NodeListImpl class.
-
Constructor Summary
ConstructorDescriptionConstructor for NodeListImpl.NodeListImpl
(List<Node> collection) Constructor for NodeListImpl. -
Method Summary
Modifier and TypeMethodDescriptionentries()
Returns an iterator, allowing code to go through all key/value pairs contained in the collection.void
Executes a provided function once per NodeList element, passing the element as an argument to the function.int
Returns the number of nodes in the collection.item
(int index) Returns the node with index index from the collection.keys()
Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection.Node[]
toArray()
toString()
values()
Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.Methods inherited from class org.loboevolution.html.node.AbstractList
add, add, addAll, addAll, clear, contains, containsAll, get, getList, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, setList, size, subList, toArray
Methods inherited from class org.loboevolution.js.AbstractScriptableDelegate
getScriptable, setScriptable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
Method Details
-
getLength
public int getLength()Returns the number of nodes in the collection. -
item
Returns the node with index index from the collection. The nodes are sorted in tree order. -
entries
Returns an iterator, allowing code to go through all key/value pairs contained in the collection.- Specified by:
entries
in interfaceNodeList
- Returns:
- a
ES6Iterator
object.
-
keys
Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection.- Specified by:
keys
in interfaceNodeList
- Returns:
- a
ES6Iterator
object.
-
values
Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.- Specified by:
values
in interfaceNodeList
- Returns:
- a
ES6Iterator
object.
-
forEach
Executes a provided function once per NodeList element, passing the element as an argument to the function. -
toArray
-
toString
-