Interface Visitor<Node>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean visitAfter​(Node parent, Node[] children)
      Visit a place in the tree: the Node for this place in the tree, and an array of Visitors of the immediate children, are passed as parameters.
      boolean visitBefore​(Node parent, Node[] children)
      Visit a place in the tree: the Node for this place in the tree, and an array of Visitors of the immediate children, are passed as parameters.
    • Method Detail

      • visitBefore

        boolean visitBefore​(Node parent,
                            Node[] children)
        Visit a place in the tree: the Node for this place in the tree, and an array of Visitors of the immediate children, are passed as parameters.
        Parameters:
        parent - - the node (value) of the parent at this point in the tree; can be updated.
        children - - array of the nodes of the children of this parent (can be zero-length array; must not be null).
        Returns:
        true or false - interpreted by the caller (typically a tree traversal algorithm).
      • visitAfter

        boolean visitAfter​(Node parent,
                           Node[] children)
        Visit a place in the tree: the Node for this place in the tree, and an array of Visitors of the immediate children, are passed as parameters.
        Parameters:
        parent - - the node (value) of the parent at this point in the tree; can be updated.
        children - - array of the nodes of the children of this parent (can be zero-length array; must not be null).
        Returns:
        true or false - interpreted by the caller (typically a tree traversal algorithm).