Interface Edge<T>

  • Type Parameters:
    T - Node type.

    public interface Edge<T>
    An edge between two nodes.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @NotNull Edge<T> flip()
      Returns a new edge with the sources and targets of this edge, but reversed.
      static <T> @NotNull Edge<T> of​(T source, T target)
      Create a new edge between source and target.
      T source()
      Returns the source of this edge.
      T target()
      Returns the target of this edge.
    • Method Detail

      • of

        @NotNull
        static <T> @NotNull Edge<T> of​(@NotNull
                                       T source,
                                       @NotNull
                                       T target)
        Create a new edge between source and target.
        Type Parameters:
        T - Node type.
        Parameters:
        source - Edge source.
        target - Edge target.
        Returns:
        new edge.
      • source

        @NotNull
        T source()
        Returns the source of this edge.
        Returns:
        edge source.
      • target

        @NotNull
        T target()
        Returns the target of this edge.
        Returns:
        edge target.
      • flip

        @NotNull
        @NotNull Edge<T> flip()
        Returns a new edge with the sources and targets of this edge, but reversed.
        Returns:
        flipped edge.