| Constructor and Description |
|---|
NodeWithChildren() |
| Modifier and Type | Method and Description |
|---|---|
NodeWithChildren |
addNode(int index,
Node node) |
NodeWithChildren |
addNode(Node node) |
NodeWithChildren |
addNodes(java.util.Collection<? extends Node> nodes) |
NodeWithChildren |
addNodes(int index,
java.util.Collection<? extends Node> nodes) |
NodeWithChildren |
addNodes(int index,
Node... nodes) |
NodeWithChildren |
addNodes(Node... nodes) |
NodeWithChildren |
clearNodes()
Remove all nodes
|
NodeWithChildren |
copy()
Simulate clone()
|
NodeWithChildren |
copy(Node orig)
Copy all data from
orig into this |
Node |
getNode(int index)
Get a specific node from the list
|
java.util.List<Node> |
getNodes()
Get the list of child nodes.
|
<T> java.util.List<T> |
getNodes(NodeFilter<T> filter) |
boolean |
hasNodes()
Does this node have children?
|
int |
nodeCount()
The number of nodes in the list
|
int |
nodeIndexOf(Node node)
The index of the node in the node list or -1 if it isn't in the list
|
Node |
removeNode(int index)
Remove a node from the list
|
boolean |
removeNode(Node n)
Remove a node from the list
|
java.lang.String |
toString() |
java.lang.String |
toXML()
Slow way to convert a node to XML
|
NodeWithChildren |
toXML(XMLWriter writer)
Fast way to convert many nodes to XML
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateClone, getTypeprivate java.util.List<Node> nodes
public NodeWithChildren addNode(Node node)
public NodeWithChildren addNode(int index, Node node)
public NodeWithChildren addNodes(java.util.Collection<? extends Node> nodes)
public NodeWithChildren addNodes(int index, java.util.Collection<? extends Node> nodes)
public NodeWithChildren addNodes(Node... nodes)
public NodeWithChildren addNodes(int index, Node... nodes)
public java.util.List<Node> getNodes()
ParentCAUTION: Changes to this list will modify the actual data structure! So don't do this unless you know what you're doing!
public boolean hasNodes()
Parentpublic int nodeCount()
Parentpublic int nodeIndexOf(Node node)
ParentnodeIndexOf in interface Parentpublic Node getNode(int index)
Parentpublic Node removeNode(int index)
ParentremoveNode in interface Parentpublic boolean removeNode(Node n)
ParentremoveNode in interface Parentpublic <T> java.util.List<T> getNodes(NodeFilter<T> filter)
public NodeWithChildren clearNodes()
ParentclearNodes in interface Parentpublic java.lang.String toXML()
Nodepublic NodeWithChildren toXML(XMLWriter writer) throws java.io.IOException
Nodepublic java.lang.String toString()
toString in class java.lang.Objectpublic NodeWithChildren copy(Node orig)
Nodeorig into thispublic NodeWithChildren copy()
Node