private class ContainsTermFeature.ContainsTermVisitor extends java.lang.Object implements Visitor
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
found |
(package private) Term |
term |
Constructor and Description |
---|
ContainsTermVisitor(Term term) |
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 found
Term term
public ContainsTermVisitor(Term term)
public boolean visitSubtree(Term visited)
Visitor
Term
should be traversed.visitSubtree
in interface Visitor
visited
- The currently visited Term
.true
visit sub tree, false
skip sub tree.public void visit(Term visited)
Visitor
public void subtreeEntered(Term subtreeRoot)
Visitor
subtreeEntered
in interface Visitor
subtreeRoot
- root of the subtree which the visitor enters.public void subtreeLeft(Term subtreeRoot)
Visitor
subtreeLeft
in interface Visitor
subtreeRoot
- root of the subtree which the visitor leaves.