| Constructor and Description |
|---|
NodeWithChildren() |
| Modifier and Type | Method and Description |
|---|---|
NodeWithChildren |
addNode(int index,
Node node) |
NodeWithChildren |
addNode(Node node) |
NodeWithChildren |
addNodes(Collection<? extends Node> nodes) |
NodeWithChildren |
addNodes(int index,
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
|
List<Node> |
getNodes()
Get the list of child nodes.
|
<T> 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
|
String |
toString() |
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, getTypepublic NodeWithChildren addNode(Node node)
public NodeWithChildren addNode(int index, Node node)
public NodeWithChildren addNodes(Collection<? extends Node> nodes)
public NodeWithChildren addNodes(int index, Collection<? extends Node> nodes)
public NodeWithChildren addNodes(Node... nodes)
public NodeWithChildren addNodes(int index, Node... nodes)
public 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> List<T> getNodes(NodeFilter<T> filter)
public NodeWithChildren clearNodes()
ParentclearNodes in interface Parentpublic String toXML()
Nodepublic NodeWithChildren toXML(XMLWriter writer) throws IOException
NodetoXML in interface NodeIOExceptionpublic NodeWithChildren copy(Node orig)
Nodeorig into thispublic NodeWithChildren copy()
NodeCopyright © 2008–2015. All rights reserved.