Interface SuccessorsFunction<N>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Iterable<? extends N> successors​(N node)
      Returns all nodes in this graph adjacent to node which can be reached by traversing node's outgoing edges in the direction (if any) of the edge.
    • Method Detail

      • successors

        java.lang.Iterable<? extends N> successors​(N node)
        Returns all nodes in this graph adjacent to node which can be reached by traversing node's outgoing edges in the direction (if any) of the edge.

        This is not the same as "all nodes reachable from node by following outgoing edges". For that functionality, see Graphs.reachableNodes(Graph, Object).

        Some algorithms that operate on a SuccessorsFunction may produce undesired results if the returned Iterable contains duplicate elements. Implementations of such algorithms should document their behavior in the presence of duplicates.

        The elements of the returned Iterable must each be:

        • Non-null
        • Usable as Map keys (see the Guava User Guide's section on graph elements for details)
        Throws:
        java.lang.IllegalArgumentException - if node is not an element of this graph