T - Type of the nodes in the list.public final class XmlNodeList<T extends XmlNode>
extends java.lang.Object
implements org.w3c.dom.NodeList
XmlNodes of a parent node.
This wrapper class is needed to ensure that all child nodes that
are accessed via the Node.getChildNodes method are of the
requested type.
XmlNode| Constructor and Description |
|---|
XmlNodeList()
Constructs a new object.
|
XmlNodeList(XmlNodeFactory<T> factory,
org.w3c.dom.NodeList nodeList)
Construct a new node list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T node)
Appends the specified element to the end of this list.
|
int |
getLength() |
org.w3c.dom.Node |
item(int index) |
public XmlNodeList()
public XmlNodeList(XmlNodeFactory<T> factory, org.w3c.dom.NodeList nodeList)
factory - The factory to resolve real T's.nodeList - The nodelist to encapsulate.public int getLength()
getLength in interface org.w3c.dom.NodeListpublic org.w3c.dom.Node item(int index)
item in interface org.w3c.dom.NodeListpublic boolean add(T node)
Note: This has no effect on the document.
node - XmlNode to be appended to this list.true (as per the general contract of the
Collection.add method).