|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Node
This interface specifies the behavior of "nodes". Nodes hold child nodes that are bound to their parent with a given name. Nodes also hold values, that are arbitrary objects also bound to their parent node using a given name.
| Method Summary | |
|---|---|
Node |
createChild(NamePart name)
Creates the node corresponding to the given name and returns it. |
Name |
getAbsolutePath()
Returns the full path to this node, starting from the root. |
Node |
getChild(NamePart name)
Returns the node with the given name. |
java.util.Iterator |
getChildren()
Returns this instance's child nodes. |
int |
getChildrenCount()
Returns the number of children that this instance contains. |
java.util.Iterator |
getChildrenNames()
Returns the names of this instance's nodes. |
java.util.Iterator |
getEntries()
|
NamePart |
getName()
Return this instance's name. |
NameParser |
getNameParser()
Returns this implementation's name parser. |
Node |
getParent()
Returns this instance's parent. |
java.lang.Object |
getValue(NamePart name)
Returns this node's value. |
int |
getValueCount()
Returns the number of values that this instance contains. |
java.util.Iterator |
getValueNames()
Returns the names of this instance's values. |
boolean |
putValue(NamePart name,
java.lang.Object value,
boolean overwrite)
Put a value into this node; overwrites the existing value - if any. |
Node |
removeChild(NamePart name)
Removes the node with the given name. |
java.lang.Object |
removeValue(NamePart name)
Internally removes the value that this node holds and returns it. |
void |
setUp(Node parent,
NamePart nodeName)
Sets this node's name and parent node. |
| Method Detail |
|---|
java.lang.Object getValue(NamePart name)
Object, or null if this node has
no value.java.lang.Object removeValue(NamePart name)
Object, or null if this node has
no value.
boolean putValue(NamePart name,
java.lang.Object value,
boolean overwrite)
name - the name under which to bind the given value.value - an Object.overwrite - if true, overwrites the already existing value
for the given name - it such is the case.
true if the given value was added. Returns false
if overwrite is false and a value already exists for the
given name.java.util.Iterator getValueNames()
Iterator of NameParts.int getValueCount()
void setUp(Node parent,
NamePart nodeName)
parent - this instance's parent NodenodeName - a NamePart.Name getAbsolutePath()
Name.Node getParent()
Node.NamePart getName()
NamePart.
Node createChild(NamePart name)
throws DuplicateException,
ProcessingException
name - a NamePart
Node.
DuplicateException - if a node exists for the given name.
ProcessingExceptionNode getChild(NamePart name)
name - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.Node removeChild(NamePart name)
name - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.java.util.Iterator getChildren()
Iterator of Nodes.int getChildrenCount()
java.util.Iterator getEntries()
Iterator of Entry instances,
corresponding to the bindings that this instance holds.java.util.Iterator getChildrenNames()
Iterator of NameParts.NameParser getNameParser()
NameParser.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||