Class AbstractHierarchicalConfiguration.DefinedVisitor<T>
- java.lang.Object
-
- org.apache.commons.configuration2.tree.ConfigurationNodeVisitorAdapter<T>
-
- org.apache.commons.configuration2.AbstractHierarchicalConfiguration.DefinedVisitor<T>
-
- Type Parameters:
T
- the type of the nodes managed by this hierarchical configuration
- All Implemented Interfaces:
ConfigurationNodeVisitor<T>
- Enclosing class:
- AbstractHierarchicalConfiguration<T>
private static final class AbstractHierarchicalConfiguration.DefinedVisitor<T> extends ConfigurationNodeVisitorAdapter<T>
A specialized visitor that checks if a node is defined. "Defined" in this terms means that the node or at least one of its sub nodes is associated with a value.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
defined
Stores the defined flag.
-
Constructor Summary
Constructors Modifier Constructor Description private
DefinedVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDefined()
Returns the defined flag.boolean
terminate()
Checks if iteration should be stopped.void
visitBeforeChildren(T node, NodeHandler<T> handler)
Visits the node.-
Methods inherited from class org.apache.commons.configuration2.tree.ConfigurationNodeVisitorAdapter
visitAfterChildren
-
-
-
-
Method Detail
-
isDefined
public boolean isDefined()
Returns the defined flag.- Returns:
- the defined flag
-
terminate
public boolean terminate()
Checks if iteration should be stopped. This can be done if the first defined node is found.- Specified by:
terminate
in interfaceConfigurationNodeVisitor<T>
- Overrides:
terminate
in classConfigurationNodeVisitorAdapter<T>
- Returns:
- a flag if iteration should be stopped
-
visitBeforeChildren
public void visitBeforeChildren(T node, NodeHandler<T> handler)
Visits the node. Checks if a value is defined.- Specified by:
visitBeforeChildren
in interfaceConfigurationNodeVisitor<T>
- Overrides:
visitBeforeChildren
in classConfigurationNodeVisitorAdapter<T>
- Parameters:
node
- the actual nodehandler
- theNodeHandler
-
-