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
  • Constructor Details

    • Pathless

      public Pathless()
  • Method Details

    • enter

      Description copied from interface: TreeVisit.ITreeVisitor
      Enters a tree node. This is called when the node is first reached, before any visitor methods are called on child nodes. See TreeVisit for an example of the call order.
      Specified by:
      enter in interface TreeVisit.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 when includePath is set to false
      Returns:
      How to proceed with the tree visit.
    • exit

      public final boolean exit(Node node, List<TreeVisit.TreePathFragment<Node>> path)
      Description copied from interface: TreeVisit.ITreeVisitor
      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. See TreeVisit for an example of the call order.
      Specified by:
      exit in interface TreeVisit.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 when includePath is set to false
      Returns:
      true to continue with the tree visit, false to exit the visit (see TreeVisit.ETreeVisitResult.QUIT).
    • visit

      public final boolean visit(Node node, List<TreeVisit.TreePathFragment<Node>> path)
      Description copied from interface: TreeVisit.ITreeVisitor
      Visits a tree node. This is called between enter and exit. See TreeVisit for an example of the call order.
      Specified by:
      visit in interface TreeVisit.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 when includePath is set to false
      Returns:
      true to continue with the tree visit, false to exit the visit (see TreeVisit.ETreeVisitResult.QUIT).
    • enter

      protected TreeVisit.ETreeVisitResult enter(Node node)
      Enters a tree node. This is called when the node is first reached, before any visitor methods are called on child nodes. See TreeVisit for an example of the call order.
      Parameters:
      node - A tree node.
      Returns:
      How to proceed with the tree visit.
    • exit

      protected boolean exit(Node node)
      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. See TreeVisit for an example of the call order.
      Parameters:
      node - A tree node.
      Returns:
      true to continue with the tree visit, false to exit the visit (see TreeVisit.ETreeVisitResult.QUIT).
    • visit

      protected boolean visit(Node node)
      Visits a tree node. This is called between enter and exit. See TreeVisit for an example of the call order.
      Parameters:
      node - A tree node.
      Returns:
      true to continue with the tree visit, false to exit the visit (see TreeVisit.ETreeVisitResult.QUIT).