N
- Node parameter type@Beta public class ImmutableGraph<N> extends ForwardingGraph<N>
Graph
whose elements and structural relationships will never change. Instances of this
class may be obtained with copyOf(Graph)
.
See the Guava User's Guide's discussion
of the Immutable*
types for more information on the properties and guarantees
provided by this class.
Modifier and Type | Field and Description |
---|---|
private BaseGraph<N> |
backingGraph |
Constructor and Description |
---|
ImmutableGraph(BaseGraph<N> backingGraph) |
Modifier and Type | Method and Description |
---|---|
private static <N> GraphConnections<N,GraphConstants.Presence> |
connectionsOf(Graph<N> graph,
N node) |
static <N> ImmutableGraph<N> |
copyOf(Graph<N> graph)
Returns an immutable copy of
graph . |
static <N> ImmutableGraph<N> |
copyOf(ImmutableGraph<N> graph)
Deprecated.
no need to use this
|
protected BaseGraph<N> |
delegate() |
private static <N> ImmutableMap<N,GraphConnections<N,GraphConstants.Presence>> |
getNodeConnections(Graph<N> graph) |
adjacentNodes, allowsSelfLoops, degree, edgeCount, hasEdgeConnecting, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successors
equals, hashCode, toString
edges, incidentEdges
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
edges, incidentEdges
public static <N> ImmutableGraph<N> copyOf(Graph<N> graph)
graph
.@Deprecated public static <N> ImmutableGraph<N> copyOf(ImmutableGraph<N> graph)
private static <N> ImmutableMap<N,GraphConnections<N,GraphConstants.Presence>> getNodeConnections(Graph<N> graph)
private static <N> GraphConnections<N,GraphConstants.Presence> connectionsOf(Graph<N> graph, N node)
protected BaseGraph<N> delegate()
delegate
in class ForwardingGraph<N>