Top Description Fields Constructors Methods
com.google.common.graph

pack-priv abstract Class AbstractUndirectedNetworkConnections<N, E>

extends Object
implements NetworkConnections<N, E>
Class Inheritance
All Implemented Interfaces
com.google.common.graph.NetworkConnections
Known Direct Subclasses
com.google.common.graph.UndirectedMultiNetworkConnections, com.google.common.graph.UndirectedNetworkConnections
Annotations
@ElementTypesAreNonnullByDefault
Type Parameters
<N>
Node parameter type
<E>
Edge parameter type
Static Imports
com.google.common.base.Preconditions.checkNotNull, .Preconditions.checkState, java.util.Objects.requireNonNull

A base implementation of NetworkConnections for undirected networks.
Author
James Sexton

Field Summary

Modifier and TypeField and Description
pack-priv final Map<E, N>
incidentEdgeMap

Keys are edges incident to the origin node, values are the node at the other end.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
addInEdge(E edge, N node, boolean isSelfLoop)

Implements com.google.common.graph.NetworkConnections.addInEdge.

Add edge to the set of incoming edges.
public void
addOutEdge(E edge, N node)

Implements com.google.common.graph.NetworkConnections.addOutEdge.

Add edge to the set of outgoing edges.
public N
adjacentNode(E edge)

Implements com.google.common.graph.NetworkConnections.adjacentNode.

Returns the node that is adjacent to the origin node along edge.
public Set<E>
public Set<E>
public Set<E>
public Set<N>
public N
removeInEdge(E edge, boolean isSelfLoop)

Implements com.google.common.graph.NetworkConnections.removeInEdge.

Remove edge from the set of incoming edges.
public N
removeOutEdge(E edge)

Implements com.google.common.graph.NetworkConnections.removeOutEdge.

Remove edge from the set of outgoing edges.
public Set<N>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

incidentEdgeMapback to summary
pack-priv final Map<E, N> incidentEdgeMap

Keys are edges incident to the origin node, values are the node at the other end.

Constructor Detail

AbstractUndirectedNetworkConnectionsback to summary
pack-priv AbstractUndirectedNetworkConnections(Map<E, N> incidentEdgeMap)

Method Detail

addInEdgeback to summary
public void addInEdge(E edge, N node, boolean isSelfLoop)

Implements com.google.common.graph.NetworkConnections.addInEdge.

Doc from com.google.common.graph.NetworkConnections.addInEdge.

Add edge to the set of incoming edges. Implicitly adds node as a predecessor.

Annotations
@Override
addOutEdgeback to summary
public void addOutEdge(E edge, N node)

Implements com.google.common.graph.NetworkConnections.addOutEdge.

Doc from com.google.common.graph.NetworkConnections.addOutEdge.

Add edge to the set of outgoing edges. Implicitly adds node as a successor.

Annotations
@Override
adjacentNodeback to summary
public N adjacentNode(E edge)

Implements com.google.common.graph.NetworkConnections.adjacentNode.

Doc from com.google.common.graph.NetworkConnections.adjacentNode.

Returns the node that is adjacent to the origin node along edge.

In the directed case, edge is assumed to be an outgoing edge.

Annotations
@Override
incidentEdgesback to summary
public Set<E> incidentEdges()

Implements com.google.common.graph.NetworkConnections.incidentEdges.

Annotations
@Override
inEdgesback to summary
public Set<E> inEdges()

Implements com.google.common.graph.NetworkConnections.inEdges.

Annotations
@Override
outEdgesback to summary
public Set<E> outEdges()

Implements com.google.common.graph.NetworkConnections.outEdges.

Annotations
@Override
predecessorsback to summary
public Set<N> predecessors()

Implements com.google.common.graph.NetworkConnections.predecessors.

Annotations
@Override
removeInEdgeback to summary
public N removeInEdge(E edge, boolean isSelfLoop)

Implements com.google.common.graph.NetworkConnections.removeInEdge.

Doc from com.google.common.graph.NetworkConnections.removeInEdge.

Remove edge from the set of incoming edges. Returns the former predecessor node.

In the undirected case, returns null if isSelfLoop is true.

Annotations
@Override
@CheckForNull
removeOutEdgeback to summary
public N removeOutEdge(E edge)

Implements com.google.common.graph.NetworkConnections.removeOutEdge.

Doc from com.google.common.graph.NetworkConnections.removeOutEdge.

Remove edge from the set of outgoing edges. Returns the former successor node.

Annotations
@Override
successorsback to summary
public Set<N> successors()

Implements com.google.common.graph.NetworkConnections.successors.

Annotations
@Override