Interface Node.Container<T extends Node>

    • Method Detail

      • findPathTo

        default Optional<List<Node>> findPathTo​(Predicate<Node> predicate)
        Description copied from interface: Node
        Finds a path down tree starting at this node to the first node that matches the predicate using depth first search.
        Specified by:
        findPathTo in interface Node
        Parameters:
        predicate - to match the target node.
        Returns:
        a path to the first node or an empty optional if none was found.