Interface PredecessorsFunction<N>

    • Method Summary

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

      • predecessors

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

        Some algorithms that operate on a PredecessorsFunction 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