|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.HierarchicalConfiguration.Node
A data class for storing (hierarchical) property information. A property can have a value and an arbitrary number of child properties.
Field Summary | |
private java.util.Map |
children
Stores the children of this node. |
private java.lang.String |
name
Stores the name of this node. |
private HierarchicalConfiguration.Node |
parent
Stores a reference to this node's parent. |
private java.lang.Object |
value
Stores the value of this node. |
Constructor Summary | |
HierarchicalConfiguration.Node()
Creates a new instance of Node . |
|
HierarchicalConfiguration.Node(java.lang.String name)
Creates a new instance of Node and sets the name. |
Method Summary | |
void |
addChild(HierarchicalConfiguration.Node child)
Adds the specified child object to this node. |
protected java.lang.Object |
clone()
Creates a copy of this object. |
AbstractConfiguration.Container |
getChildren()
Returns a list with the child nodes of this node. |
AbstractConfiguration.Container |
getChildren(java.lang.String name)
Returns a list with this node's children with the given name. |
java.lang.String |
getName()
Returns the name of this node. |
HierarchicalConfiguration.Node |
getParent()
Returns the parent of this node. |
java.lang.Object |
getValue()
Returns the value of this node. |
boolean |
remove(HierarchicalConfiguration.Node child)
Removes the specified child from this node. |
boolean |
remove(java.lang.String name)
Removes all children with the given name. |
void |
removeChildren()
Removes all children of this node. |
void |
setName(java.lang.String string)
Sets the name of this node. |
void |
setParent(HierarchicalConfiguration.Node node)
Sets the parent of this node. |
void |
setValue(java.lang.Object object)
Sets the value of this node. |
void |
visit(HierarchicalConfiguration.NodeVisitor visitor,
ConfigurationKey key)
A generic method for traversing this node and all of its children. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private HierarchicalConfiguration.Node parent
private java.lang.String name
private java.lang.Object value
private java.util.Map children
Constructor Detail |
public HierarchicalConfiguration.Node()
Node
.
public HierarchicalConfiguration.Node(java.lang.String name)
Node
and sets the name.
name
- the node's nameMethod Detail |
public java.lang.String getName()
public java.lang.Object getValue()
public HierarchicalConfiguration.Node getParent()
public void setName(java.lang.String string)
string
- the node namepublic void setValue(java.lang.Object object)
object
- the node valuepublic void setParent(HierarchicalConfiguration.Node node)
node
- the parent nodepublic void addChild(HierarchicalConfiguration.Node child)
child
- the child to be addedpublic AbstractConfiguration.Container getChildren()
public AbstractConfiguration.Container getChildren(java.lang.String name)
name
- the name of the children
public boolean remove(HierarchicalConfiguration.Node child)
child
- the child node to be removed
public boolean remove(java.lang.String name)
name
- the name of the children to be removed
public void removeChildren()
public void visit(HierarchicalConfiguration.NodeVisitor visitor, ConfigurationKey key)
visitor
- the visitorkey
- here a configuration key with the name of the root node
of the iteration can be passed; if this key is not null, the
full pathes to the visited nodes are builded and passed to the
visitor's visit()
methodsprotected java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |