public class DepthFirstInstanceTraverser extends Object implements InstanceTraverser
Constructor and Description |
---|
DepthFirstInstanceTraverser()
Creates a depth first instance traverser.
|
DepthFirstInstanceTraverser(boolean cancelChildTraversalOnly)
Creates a depth first instance traverser.
|
Modifier and Type | Method and Description |
---|---|
boolean |
traverse(Group group,
InstanceTraversalCallback callback)
Traverse the given group.
|
boolean |
traverse(Instance instance,
InstanceTraversalCallback callback)
Traverse the given instance.
|
boolean |
traverse(Object value,
InstanceTraversalCallback callback)
Traverse the given value.
|
protected boolean |
traverseChildren(Group group,
InstanceTraversalCallback callback)
Traverse the children of a given group.
|
public DepthFirstInstanceTraverser()
public DepthFirstInstanceTraverser(boolean cancelChildTraversalOnly)
cancelChildTraversalOnly
- if when the callback cancels the
traversal, only the traversal of the children should be
canceled (meaning traversal is continued but not down from the
current object)public boolean traverse(Instance instance, InstanceTraversalCallback callback)
InstanceTraverser
traverse
in interface InstanceTraverser
instance
- the instancecallback
- the traversal callbackInstanceTraverser.traverse(Instance, InstanceTraversalCallback)
public boolean traverse(Group group, InstanceTraversalCallback callback)
InstanceTraverser
traverse
in interface InstanceTraverser
group
- the groupcallback
- the traversal callbackInstanceTraverser.traverse(Group, InstanceTraversalCallback)
protected boolean traverseChildren(Group group, InstanceTraversalCallback callback)
group
- the groupcallback
- the traversal callbackpublic boolean traverse(Object value, InstanceTraversalCallback callback)
InstanceTraverser
traverse
in interface InstanceTraverser
value
- the value, if a Group
or Instance
the call
must be handed over to the respective traverse methodscallback
- the traversal callbackInstanceTraverser.traverse(Object, InstanceTraversalCallback)
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a