org.apache.commons.configuration
public static class HierarchicalConfiguration.Node extends DefaultConfigurationNode implements Serializable
DefaultconfigurationNode
class that exists mainly for the purpose of backwards compatibility.
Field Summary | |
---|---|
static long | serialVersionUID
The serial version UID. |
Constructor Summary | |
---|---|
Node()
Creates a new instance of Node . | |
Node(String name)
Creates a new instance of Node and sets the name.
| |
Node(String name, Object value)
Creates a new instance of Node and sets the name and the value.
| |
Node(ConfigurationNode src)
Creates a new instance of Node based on the given
source node. |
Method Summary | |
---|---|
void | addChild(HierarchicalConfiguration.Node node)
Adds the given node to the children of this node.
|
HierarchicalConfiguration.Node | getParent()
Returns the parent of this node.
|
boolean | hasChildren()
Returns a flag whether this node has child elements.
|
boolean | remove(HierarchicalConfiguration.Node child)
Removes the specified child from this node.
|
boolean | remove(String name)
Removes all children with the given name.
|
void | setParent(HierarchicalConfiguration.Node node)
Sets the parent of this node.
|
void | visit(HierarchicalConfiguration.NodeVisitor visitor, ConfigurationKey key)
A generic method for traversing this node and all of its children.
|
Node
.Node
and sets the name.
Parameters: name the node's name
Node
and sets the name and the value.
Parameters: name the node's name value the value
Node
based on the given
source node. All properties of the source node, including its
children and attributes, will be copied.
Parameters: src the node to be copied
Parameters: node the child to be added
Returns: this node's parent (can be null)
Returns: true if there is a child node, false otherwise
Parameters: child the child node to be removed
Returns: a flag if the child could be found
Parameters: name the name of the children to be removed
Returns: a flag if children with this name existed
Parameters: node the parent node
Parameters: visitor the visitor key 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()
methods