public interface Visitor
Modifier and Type | Method and Description |
---|---|
void |
subtreeEntered(Term subtreeRoot)
this method is called in execPreOrder and execPostOrder in class Term
when entering the subtree rooted in the term subtreeRoot.
|
void |
subtreeLeft(Term subtreeRoot)
this method is called in execPreOrder and execPostOrder in class Term
when leaving the subtree rooted in the term subtreeRoot.
|
void |
visit(Term visited)
the entry method for the visitor pattern
|
boolean |
visitSubtree(Term visited)
Checks if the subtree below the visited
Term should be traversed. |
boolean visitSubtree(Term visited)
Term
should be traversed.visited
- The currently visited Term
.true
visit sub tree, false
skip sub tree.void visit(Term visited)
visited
- the Term to be visitedvoid subtreeEntered(Term subtreeRoot)
subtreeRoot
- root of the subtree which the visitor enters.void subtreeLeft(Term subtreeRoot)
subtreeRoot
- root of the subtree which the visitor leaves.