Class TreeVisit.ITreeVisitor.Pathless<Node>
java.lang.Object
de.xima.fc.common.tree.TreeVisit.ITreeVisitor.Pathless<Node>
- Type Parameters:
Node- Type of the tree nodes.
- All Implemented Interfaces:
TreeVisit.ITreeVisitor<Node>
- Direct Known Subclasses:
FindPositionVisitor
- Enclosing interface:
TreeVisit.ITreeVisitor<Node>
public abstract static class TreeVisit.ITreeVisitor.Pathless<Node>
extends Object
implements TreeVisit.ITreeVisitor<Node>
A convenient
TreeVisit.ITreeVisitor with a path parameter for the methods. useful if you do not
need it.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested classes/interfaces inherited from interface TreeVisit.ITreeVisitor
TreeVisit.ITreeVisitor.Pathless<Node> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TreeVisit.ETreeVisitResultEnters a tree node.enter(Node node, List<TreeVisit.TreePathFragment<Node>> path) Enters a tree node.protected booleanExists a tree node.final booleanexit(Node node, List<TreeVisit.TreePathFragment<Node>> path) Exists a tree node.protected booleanVisits a tree node.final booleanvisit(Node node, List<TreeVisit.TreePathFragment<Node>> path) Visits a tree node.
-
Constructor Details
-
Pathless
public Pathless()
-
-
Method Details
-
enter
public final TreeVisit.ETreeVisitResult enter(Node node, List<TreeVisit.TreePathFragment<Node>> path) Description copied from interface:TreeVisit.ITreeVisitorEnters a tree node. This is called when the node is first reached, before any visitor methods are called on child nodes. SeeTreeVisitfor an example of the call order.- Specified by:
enterin interfaceTreeVisit.ITreeVisitor<Node>- Parameters:
node- A tree node.path- The path of the node, i.e. all parents of the node. This is always an empty list whenincludePathis set tofalse- Returns:
- How to proceed with the tree visit.
-
exit
Description copied from interface:TreeVisit.ITreeVisitorExists a tree node. This is called at the end, after all children were visited. No more visitor methods will be called on any children of the node. SeeTreeVisitfor an example of the call order.- Specified by:
exitin interfaceTreeVisit.ITreeVisitor<Node>- Parameters:
node- A tree node.path- The path of the node, i.e. all parents of the node. This is always an empty list whenincludePathis set tofalse- Returns:
trueto continue with the tree visit,falseto exit the visit (seeTreeVisit.ETreeVisitResult.QUIT).
-
visit
Description copied from interface:TreeVisit.ITreeVisitorVisits a tree node. This is called betweenenterandexit. SeeTreeVisitfor an example of the call order.- Specified by:
visitin interfaceTreeVisit.ITreeVisitor<Node>- Parameters:
node- A tree node.path- The path of the node, i.e. all parents of the node. This is always an empty list whenincludePathis set tofalse- Returns:
trueto continue with the tree visit,falseto exit the visit (seeTreeVisit.ETreeVisitResult.QUIT).
-
enter
Enters a tree node. This is called when the node is first reached, before any visitor methods are called on child nodes. SeeTreeVisitfor an example of the call order.- Parameters:
node- A tree node.- Returns:
- How to proceed with the tree visit.
-
exit
Exists a tree node. This is called at the end, after all children were visited. No more visitor methods will be called on any children of the node. SeeTreeVisitfor an example of the call order.- Parameters:
node- A tree node.- Returns:
trueto continue with the tree visit,falseto exit the visit (seeTreeVisit.ETreeVisitResult.QUIT).
-
visit
Visits a tree node. This is called betweenenterandexit. SeeTreeVisitfor an example of the call order.- Parameters:
node- A tree node.- Returns:
trueto continue with the tree visit,falseto exit the visit (seeTreeVisit.ETreeVisitResult.QUIT).
-