public static class HierarchicalConfiguration.NodeVisitor extends Object
Definition of a visitor class for traversing a node and all of its children.
This class defines the interface of a visitor for
Node
objects and provides a default implementation. The
method visit()
of Node
implements a generic
iteration algorithm based on the Visitor pattern. By providing
different implementations of visitors it is possible to collect different
data during the iteration process.
Constructor and Description |
---|
HierarchicalConfiguration.NodeVisitor() |
Modifier and Type | Method and Description |
---|---|
boolean |
terminate()
Returns a flag that indicates if iteration should be stopped.
|
void |
visitAfterChildren(HierarchicalConfiguration.Node node,
ConfigurationKey key)
Visits the specified node after its children have been processed.
|
void |
visitBeforeChildren(HierarchicalConfiguration.Node node,
ConfigurationKey key)
Visits the specified node.
|
public HierarchicalConfiguration.NodeVisitor()
public void visitBeforeChildren(HierarchicalConfiguration.Node node, ConfigurationKey key)
node
- the actual nodekey
- the key of this node (may be null )public void visitAfterChildren(HierarchicalConfiguration.Node node, ConfigurationKey key)
node
- the node to be visitedkey
- the key of this node (may be null )public boolean terminate()
Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.