Class EndpointPair<N>

java.lang.Object
com.google.common.graph.EndpointPair<N>
All Implemented Interfaces:
Iterable<N>

@Beta @Immutable(containerOf="N") public abstract class EndpointPair<N> extends Object implements 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