Package org.jdesktop.dom
Class SimpleNodeList
java.lang.Object
org.jdesktop.dom.SimpleNodeList
An implementation of NodeList which also implements
Iterable. This allows you to use a SimpleNodeList in an enhanced
for loop, such as:
SimpleNodeList nodes = ...;
for (Node n : nodes) {
System.out.println(n.getTextContent());
}
SimpleNodeList wraps a source NodeList. Thus, any NodeList can be adapted for use with enhanced for loops by wrapping it in a SimpleNodeList.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleNodeList(List<Node> nodes)Create a new SimpleNodeList that wraps the given nodesSimpleNodeList(Node... nodes)Create a new SimpleNodeList that wraps the given nodesSimpleNodeList(NodeList list)Creates a new instance of SimpleNodeList. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SimpleNodeList
Creates a new instance of SimpleNodeList.- Parameters:
list- the NodeList to wrap.
-
SimpleNodeList
Create a new SimpleNodeList that wraps the given nodes- Parameters:
nodes- the nodes to wrap
-
SimpleNodeList
Create a new SimpleNodeList that wraps the given nodes- Parameters:
nodes- the nodes to wrap
-
-
Method Details