Interface Visitor<T extends Visitable<T>>


  • @Internal
    public interface Visitor<T extends Visitable<T>>
    A visitor encapsulates functionality that is applied to each node in the process of a traversal of a tree or DAG.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void postVisit​(T visitable)
      Method that is invoked after all child nodes or descendant nodes were visited.
      boolean preVisit​(T visitable)
      Method that is invoked on the visit before visiting and child nodes or descendant nodes.
    • Method Detail

      • preVisit

        boolean preVisit​(T visitable)
        Method that is invoked on the visit before visiting and child nodes or descendant nodes.
        Returns:
        True, if the traversal should continue, false otherwise.
      • postVisit

        void postVisit​(T visitable)
        Method that is invoked after all child nodes or descendant nodes were visited.