public class NodeTraversor extends Object
Constructor and Description |
---|
NodeTraversor(NodeVisitor visitor)
Create a new traversor.
|
Modifier and Type | Method and Description |
---|---|
void |
traverse(Node root)
Start a depth-first traverse of the root and all of its descendants.
|
public NodeTraversor(NodeVisitor visitor)
visitor
- a class implementing the NodeVisitor
interface, to be called when visiting each node.public void traverse(Node root)
root
- the root node point to traverse.Copyright © 2009–2015 Jonathan Hedley. All rights reserved.