N - Node parameter typeV - Value parameter typepublic final class ImmutableValueGraph<N,V> extends StandardValueGraph<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.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableValueGraph.Builder<N,V>
A builder for creating
ImmutableValueGraph instances, especially static final
graphs. |
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) |
ElementOrder<N> |
incidentEdgeOrder()
Returns an
ElementOrder that specifies the order of iteration for the elements of
BaseGraph.edges(), BaseGraph.adjacentNodes(Object), BaseGraph.predecessors(Object), BaseGraph.successors(Object) and BaseGraph.incidentEdges(Object). |
adjacentNodes, allowsSelfLoops, containsNode, edgeCount, edgeValueOrDefault, edgeValueOrDefault, hasEdgeConnecting, hasEdgeConnecting, incidentEdges, isDirected, nodeOrder, nodes, predecessors, successorsedgeValue, edgeValue, equals, hashCode, toStringdegree, edges, inDegree, isOrderingCompatible, outDegree, validateEndpointsclone, finalize, getClass, notify, notifyAll, wait, wait, waitdegree, edges, inDegree, outDegreeprivate 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 ElementOrder<N> incidentEdgeOrder()
BaseGraphElementOrder that specifies the order of iteration for the elements of
BaseGraph.edges(), BaseGraph.adjacentNodes(Object), BaseGraph.predecessors(Object), BaseGraph.successors(Object) and BaseGraph.incidentEdges(Object).incidentEdgeOrder in interface BaseGraph<N>incidentEdgeOrder in interface ValueGraph<N,V>incidentEdgeOrder in class AbstractBaseGraph<N>public ImmutableGraph<N> asGraph()
ValueGraphGraph. 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)