Package ch.rabanti.nanoxlsx4j.lowLevel
Class XmlDocument.XmlNodeList
java.lang.Object
ch.rabanti.nanoxlsx4j.lowLevel.XmlDocument.XmlNodeList
- All Implemented Interfaces:
Iterable<XmlDocument.XmlNode>,Iterator<XmlDocument.XmlNode>
- Enclosing class:
- XmlDocument
public static class XmlDocument.XmlNodeList
extends Object
implements Iterable<XmlDocument.XmlNode>, Iterator<XmlDocument.XmlNode>
Class representing an iterable list of XML nodes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(XmlDocument.XmlNode node) Adds an XML node to the node listvoidaddRange(List<XmlDocument.XmlNode> list) Adds a list of XML nodes to the node listvoidforEach(Consumer<? super XmlDocument.XmlNode> action) get(int index) Gets an XML node at the given indexbooleanhasNext()iterator()next()intsize()Gets the size of XML node listMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
XmlNodeList
public XmlNodeList()
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<XmlDocument.XmlNode>
-
next
- Specified by:
nextin interfaceIterator<XmlDocument.XmlNode>
-
iterator
- Specified by:
iteratorin interfaceIterable<XmlDocument.XmlNode>
-
forEach
- Specified by:
forEachin interfaceIterable<XmlDocument.XmlNode>
-
size
public int size()Gets the size of XML node list- Returns:
- Number of elements
-
add
Adds an XML node to the node list- Parameters:
node- Item to add
-
addRange
Adds a list of XML nodes to the node list- Parameters:
list- List of items
-
get
Gets an XML node at the given index- Parameters:
index- Index of the node- Returns:
- XML node
-