|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.pdark.decentxml.NodeWithChildren
public abstract class NodeWithChildren
This class contains all the code necessary to implement nodes which can have child nodes (like Document or Element).
Constructor Summary | |
---|---|
NodeWithChildren()
|
Method Summary | |
---|---|
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. |
java.util.List<Node> |
getNodes(NodeFilter 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.pdark.decentxml.Parent |
---|
getChild |
Methods inherited from interface de.pdark.decentxml.Node |
---|
createClone, getType |
Constructor Detail |
---|
public NodeWithChildren()
Method Detail |
---|
public NodeWithChildren addNode(Node node)
addNode
in interface Parent
public NodeWithChildren addNode(int index, Node node)
addNode
in interface Parent
public NodeWithChildren addNodes(java.util.Collection<? extends Node> nodes)
addNodes
in interface Parent
public NodeWithChildren addNodes(int index, java.util.Collection<? extends Node> nodes)
addNodes
in interface Parent
public NodeWithChildren addNodes(Node... nodes)
addNodes
in interface Parent
public NodeWithChildren addNodes(int index, Node... nodes)
addNodes
in interface Parent
public java.util.List<Node> getNodes()
Parent
CAUTION: Changes to this list will modify the actual data structure! So don't do this unless you know what you're doing!
getNodes
in interface Parent
public boolean hasNodes()
Parent
hasNodes
in interface Parent
public int nodeCount()
Parent
nodeCount
in interface Parent
public int nodeIndexOf(Node node)
Parent
nodeIndexOf
in interface Parent
public Node getNode(int index)
Parent
getNode
in interface Parent
public Node removeNode(int index)
Parent
removeNode
in interface Parent
public boolean removeNode(Node n)
Parent
removeNode
in interface Parent
public java.util.List<Node> getNodes(NodeFilter filter)
public NodeWithChildren clearNodes()
Parent
clearNodes
in interface Parent
public java.lang.String toXML()
Node
toXML
in interface Node
public NodeWithChildren toXML(XMLWriter writer) throws java.io.IOException
Node
toXML
in interface Node
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public NodeWithChildren copy(Node orig)
Node
orig
into this
copy
in interface Node
public NodeWithChildren copy()
Node
copy
in interface Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |