N
- Node parameter typeV
- Value parameter type@Beta public final class ImmutableValueGraph<N,V> extends ConfigurableValueGraph<N,V>
ValueGraph
whose elements and structural relationships will never change. Instances of
this class may be obtained with copyOf(ValueGraph)
.
See the Guava User's Guide's discussion
of the Immutable*
types for more information on the properties and guarantees
provided by this class.
edgeCount, nodeConnections
Modifier | Constructor and Description |
---|---|
private |
ImmutableValueGraph(ValueGraph<N,V> graph) |
Modifier and Type | Method and Description |
---|---|
ImmutableGraph<N> |
asGraph()
Returns a live view of this graph as a
Graph . |
private static <N,V> GraphConnections<N,V> |
connectionsOf(ValueGraph<N,V> graph,
N node) |
static <N,V> ImmutableValueGraph<N,V> |
copyOf(ImmutableValueGraph<N,V> graph)
Deprecated.
no need to use this
|
static <N,V> ImmutableValueGraph<N,V> |
copyOf(ValueGraph<N,V> graph)
Returns an immutable copy of
graph . |
private static <N,V> ImmutableMap<N,GraphConnections<N,V>> |
getNodeConnections(ValueGraph<N,V> graph) |
adjacentNodes, allowsSelfLoops, checkedConnections, containsNode, edgeCount, edgeValueOrDefault, hasEdgeConnecting, isDirected, nodeOrder, nodes, predecessors, successors
edgeValue, equals, hashCode, toString
degree, edges, incidentEdges, inDegree, outDegree
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
degree, edges, incidentEdges, inDegree, outDegree
private ImmutableValueGraph(ValueGraph<N,V> graph)
public static <N,V> ImmutableValueGraph<N,V> copyOf(ValueGraph<N,V> graph)
graph
.@Deprecated public static <N,V> ImmutableValueGraph<N,V> copyOf(ImmutableValueGraph<N,V> graph)
public ImmutableGraph<N> asGraph()
ValueGraph
Graph
. The resulting Graph
will have an
edge connecting node A to node B if this ValueGraph
has an edge connecting A to B.asGraph
in interface ValueGraph<N,V>
asGraph
in class AbstractValueGraph<N,V>
private static <N,V> ImmutableMap<N,GraphConnections<N,V>> getNodeConnections(ValueGraph<N,V> graph)
private static <N,V> GraphConnections<N,V> connectionsOf(ValueGraph<N,V> graph, N node)