public abstract class DefaultTreeWalker<E> extends Object implements TreeWalker<E>
Constructor and Description |
---|
DefaultTreeWalker() |
Modifier and Type | Method and Description |
---|---|
void |
onCompleted()
Called at the end of the iteration.
|
void |
onNode(E node)
Called on visiting a node.
|
void |
onNodeChildrenCompleted(E node)
Called after all child nodes (and their children) have been visited and before the next sibling node is visited.
|
void |
onNodeChildrenRemaining(E node)
Called after a child node (and its children) have been visited and before the next child node is visited.
|
void |
onNodeChildrenStarted(E node)
Called before the first child of a node is visited.
|
void |
onNodeNoChildren(E node)
Called when the last visited node has no children.
|
void |
onStarted()
Called on the start of the iteration.
|
public void onStarted()
TreeWalker
onStarted
in interface TreeWalker<E>
public void onNode(E node)
TreeWalker
onNode
in interface TreeWalker<E>
node
- The nodepublic void onNodeChildrenStarted(E node)
TreeWalker
onNodeChildrenStarted
in interface TreeWalker<E>
node
- The nodepublic void onNodeChildrenRemaining(E node)
TreeWalker
onNodeChildrenRemaining
in interface TreeWalker<E>
node
- The parent nodepublic void onNodeChildrenCompleted(E node)
TreeWalker
onNodeChildrenCompleted
in interface TreeWalker<E>
node
- The nodepublic void onNodeNoChildren(E node)
TreeWalker
onNodeNoChildren
in interface TreeWalker<E>
node
- The node with no childrenpublic void onCompleted()
TreeWalker
onCompleted
in interface TreeWalker<E>
Copyright © 2014–2016. All rights reserved.