|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
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. |
Iterator |
getChildren()
Returns this instance's child nodes. |
int |
getChildrenCount()
Returns the number of children that this instance contains. |
Iterator |
getChildrenNames()
Returns the names of this instance's nodes. |
Iterator |
getEntries()
|
NamePart |
getName()
Return this instance's name. |
NameParser |
getNameParser()
Returns this implementation's name parser. |
Node |
getParent()
Returns this instance's parent. |
Object |
getValue(NamePart name)
Returns this node's value. |
int |
getValueCount()
Returns the number of values that this instance contains. |
Iterator |
getValueNames()
Returns the names of this instance's values. |
boolean |
putValue(NamePart name,
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. |
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 |
public Object getValue(NamePart name)
Object, or null if this node has
no value.public Object removeValue(NamePart name)
Object, or null if this node has
no value.
public boolean putValue(NamePart name,
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.public Iterator getValueNames()
Iterator of NameParts.public int getValueCount()
public void setUp(Node parent,
NamePart nodeName)
parent - this instance's parent NodenodeName - a NamePart.public Name getAbsolutePath()
Name.public Node getParent()
Node.public NamePart getName()
NamePart.
public Node createChild(NamePart name)
throws DuplicateException,
ProcessingException
name - a NamePart
Node.
DuplicateException - if a node exists for the given name.
ProcessingExceptionpublic Node 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.public 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.public Iterator getChildren()
Iterator of Nodes.public int getChildrenCount()
public Iterator getEntries()
Iterator of Entry instances,
corresponding to the bindings that this instance holds.public Iterator getChildrenNames()
Iterator of NameParts.public NameParser getNameParser()
NameParser.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||