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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the defined flag.booleanChecks if iteration should be stopped.voidvisitBeforeChildren(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
-
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:
terminatein interfaceConfigurationNodeVisitor<T>- Overrides:
terminatein classConfigurationNodeVisitorAdapter<T>- Returns:
- a flag if iteration should be stopped
-
visitBeforeChildren
Visits the node. Checks if a value is defined.- Specified by:
visitBeforeChildrenin interfaceConfigurationNodeVisitor<T>- Overrides:
visitBeforeChildrenin classConfigurationNodeVisitorAdapter<T>- Parameters:
node- the actual nodehandler- theNodeHandler
-