N
- Node parameter type@Beta public abstract 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 | Class and Description |
---|---|
(package private) static class |
ImmutableGraph.ValueBackedImpl<N,V> |
Constructor and Description |
---|
ImmutableGraph()
To ensure the immutability contract is maintained, there must be no public constructors.
|
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
|
private static <N> ImmutableMap<N,GraphConnections<N,GraphConstants.Presence>> |
getNodeConnections(Graph<N> graph) |
adjacentNodes, allowsSelfLoops, degree, delegate, edges, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successors
edgeCount, toString
ImmutableGraph()
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)