Class EndpointPair<N>

  • All Implemented Interfaces:
    java.lang.Iterable<N>

    @Beta
    @Immutable(containerOf="N")
    public abstract class EndpointPair<N>
    extends java.lang.Object
    implements java.lang.Iterable<N>
    An immutable pair representing the two endpoints of an edge in a graph. The EndpointPair of a directed edge is an ordered pair of nodes (source() and target()). The EndpointPair of an undirected edge is an unordered pair of nodes (nodeU() and nodeV()).

    The edge is a self-loop if, and only if, the two endpoints are equal.

    Since:
    20.0
    Author:
    James Sexton