Uses of Class
com.google.common.graph.EndpointPair
-
Uses of EndpointPair in com.google.common.graph
Modifier and TypeMethodDescriptionNetwork.incidentNodes
(E edge) Returns the nodes which are the endpoints ofedge
in this network.static <N> EndpointPair
<N> EndpointPair.ordered
(N source, N target) Returns anEndpointPair
representing the endpoints of a directed edge.static <N> EndpointPair
<N> EndpointPair.unordered
(N nodeU, N nodeV) Returns anEndpointPair
representing the endpoints of an undirected edge.Modifier and TypeMethodDescriptionSet
<EndpointPair<N>> Graph.edges()
Returns all edges in this graph.Set
<EndpointPair<N>> ValueGraph.edges()
Returns all edges in this graph.Set
<EndpointPair<N>> Graph.incidentEdges
(N node) Returns a live view of the edges in this graph whose endpoints includenode
.Set
<EndpointPair<N>> ValueGraph.incidentEdges
(N node) Returns a live view of the edges in this graph whose endpoints includenode
.Modifier and TypeMethodDescriptionImmutableNetwork.Builder.addEdge
(EndpointPair<N> endpoints, E edge) Addsedge
connectingendpoints
.boolean
MutableNetwork.addEdge
(EndpointPair<N> endpoints, E edge) Addsedge
connectingendpoints
.AbstractNetwork.edgeConnecting
(EndpointPair<N> endpoints) Network.edgeConnecting
(EndpointPair<N> endpoints) Returns the single edge that directly connectsendpoints
(in the order, if any, specified byendpoints
), if one is present, orOptional.empty()
if no such edge exists.AbstractNetwork.edgeConnectingOrNull
(EndpointPair<N> endpoints) Network.edgeConnectingOrNull
(EndpointPair<N> endpoints) Returns the single edge that directly connectsendpoints
(in the order, if any, specified byendpoints
), if one is present, ornull
if no such edge exists.AbstractNetwork.edgesConnecting
(EndpointPair<N> endpoints) Network.edgesConnecting
(EndpointPair<N> endpoints) Returns a live view of the set of edges that each directly connectendpoints
(in the order, if any, specified byendpoints
).AbstractValueGraph.edgeValue
(EndpointPair<N> endpoints) ValueGraph.edgeValue
(EndpointPair<N> endpoints) Returns the value of the edge that connectsendpoints
(in the order, if any, specified byendpoints
), if one is present; otherwise, returnsOptional.empty()
.ValueGraph.edgeValueOrDefault
(EndpointPair<N> endpoints, @Nullable V defaultValue) Returns the value of the edge that connectsendpoints
(in the order, if any, specified byendpoints
), if one is present; otherwise, returnsdefaultValue
.boolean
AbstractNetwork.hasEdgeConnecting
(EndpointPair<N> endpoints) boolean
Graph.hasEdgeConnecting
(EndpointPair<N> endpoints) Returns true if there is an edge that directly connectsendpoints
(in the order, if any, specified byendpoints
).boolean
Network.hasEdgeConnecting
(EndpointPair<N> endpoints) Returns true if there is an edge that directly connectsendpoints
(in the order, if any, specified byendpoints
).boolean
ValueGraph.hasEdgeConnecting
(EndpointPair<N> endpoints) Returns true if there is an edge that directly connectsendpoints
(in the order, if any, specified byendpoints
).protected final boolean
AbstractNetwork.isOrderingCompatible
(EndpointPair<?> endpoints) ImmutableGraph.Builder.putEdge
(EndpointPair<N> endpoints) Adds an edge connectingendpoints
(in the order, if any, specified byendpoints
) if one is not already present.boolean
MutableGraph.putEdge
(EndpointPair<N> endpoints) Adds an edge connectingendpoints
(in the order, if any, specified byendpoints
) if one is not already present.ImmutableValueGraph.Builder.putEdgeValue
(EndpointPair<N> endpoints, V value) Adds an edge connectingendpoints
if one is not already present, and sets a value for that edge tovalue
(overwriting the existing value, if any).MutableValueGraph.putEdgeValue
(EndpointPair<N> endpoints, V value) Adds an edge connectingendpoints
if one is not already present, and sets a value for that edge tovalue
(overwriting the existing value, if any).boolean
MutableGraph.removeEdge
(EndpointPair<N> endpoints) Removes the edge connectingendpoints
, if it is present.MutableValueGraph.removeEdge
(EndpointPair<N> endpoints) Removes the edge connectingendpoints
, if it is present.protected final void
AbstractNetwork.validateEndpoints
(EndpointPair<?> endpoints) Throws an IllegalArgumentException if the ordering ofendpoints
is not compatible with the directionality of this graph.