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 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the defined flag.boolean
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
-
Field Details
-
defined
private boolean definedStores the defined flag.
-
-
Constructor Details
-
DefinedVisitor
private DefinedVisitor()
-
-
Method Details
-
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
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
-
isDefined
public boolean isDefined()Returns the defined flag.- Returns:
- the defined flag
-