Class NodeListImpl
- All Implemented Interfaces:
Iterable<Node>,Collection<Node>,List<Node>,SequencedCollection<Node>,NodeList,ScriptableDelegate
NodeListImpl class.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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.voidExecutes a provided function once per NodeList element, passing the element as an argument to the function.intReturns 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, toArrayMethods inherited from class org.loboevolution.js.AbstractScriptableDelegate
getScriptable, setScriptableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
entriesin interfaceNodeList- Returns:
- a
ES6Iteratorobject.
-
keys
Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection.- Specified by:
keysin interfaceNodeList- Returns:
- a
ES6Iteratorobject.
-
values
Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.- Specified by:
valuesin interfaceNodeList- Returns:
- a
ES6Iteratorobject.
-
forEach
Executes a provided function once per NodeList element, passing the element as an argument to the function. -
toArray
-
toString
-