protected static class DefaultConfigurationNode.SubNodes extends java.lang.Object
| Modifier | Constructor | Description |
|---|---|---|
protected |
SubNodes() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addNode(ConfigurationNode node) |
Adds a new sub node.
|
void |
clear() |
Removes all sub nodes.
|
protected void |
detachNode(ConfigurationNode subNode) |
This method is called whenever a sub node is removed from this
object.
|
protected void |
detachNodes(java.util.Collection<? extends ConfigurationNode> subNodes) |
Detaches a list of sub nodes.
|
ConfigurationNode |
getNode(int index) |
Returns the node with the given index.
|
java.util.List<ConfigurationNode> |
getSubNodes() |
Returns a list with all stored sub nodes.
|
java.util.List<ConfigurationNode> |
getSubNodes(java.lang.String name) |
Returns a list of the sub nodes with the given name.
|
boolean |
removeNode(ConfigurationNode node) |
Removes a sub node.
|
boolean |
removeNodes(java.lang.String name) |
Removes all sub nodes with the given name.
|
void |
visit(ConfigurationNodeVisitor visitor) |
Let the passed in visitor visit all sub nodes.
|
protected SubNodes()
public void addNode(ConfigurationNode node)
node - the node to addpublic boolean removeNode(ConfigurationNode node)
node - the node to removepublic boolean removeNodes(java.lang.String name)
name - the namepublic void clear()
public ConfigurationNode getNode(int index)
IndexOutOfBoundException exception will be thrown.index - the index (0-based)public java.util.List<ConfigurationNode> getSubNodes()
public java.util.List<ConfigurationNode> getSubNodes(java.lang.String name)
name - the name; if null is passed, all sub nodes will
be returnedpublic void visit(ConfigurationNodeVisitor visitor)
visitor - the visitorprotected void detachNode(ConfigurationNode subNode)
removeReference() method gets called.subNode - the node to be removedprotected void detachNodes(java.util.Collection<? extends ConfigurationNode> subNodes)
detachNode() for each node contained in the list.subNodes - the list with nodes to be detached