Package com.google.common.graph
Class ImmutableValueGraph<N,V>
java.lang.Object
com.google.common.graph.AbstractBaseGraph<N>
com.google.common.graph.AbstractValueGraph<N,V>
com.google.common.graph.StandardValueGraph<N,V>
com.google.common.graph.ImmutableValueGraph<N,V>
- Type Parameters:
N
- Node parameter typeV
- Value parameter type
- All Implemented Interfaces:
BaseGraph<N>
,PredecessorsFunction<N>
,SuccessorsFunction<N>
,ValueGraph<N,
V>
A
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.
- Since:
- 20.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder for creatingImmutableValueGraph
instances, especiallystatic final
graphs. -
Field Summary
Fields inherited from class com.google.common.graph.StandardValueGraph
edgeCount, nodeConnections
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasGraph()
Returns a live view of this graph as aGraph
.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 thisstatic <N,
V> ImmutableValueGraph <N, V> copyOf
(ValueGraph<N, V> graph) Returns an immutable copy ofgraph
.private static <N,
V> ImmutableMap <N, GraphConnections<N, V>> getNodeConnections
(ValueGraph<N, V> graph) Returns anElementOrder
that specifies the order of iteration for the elements ofBaseGraph.edges()
,BaseGraph.adjacentNodes(Object)
,BaseGraph.predecessors(Object)
,BaseGraph.successors(Object)
andBaseGraph.incidentEdges(Object)
.Methods inherited from class com.google.common.graph.StandardValueGraph
adjacentNodes, allowsSelfLoops, containsNode, edgeCount, edgeValueOrDefault, edgeValueOrDefault, hasEdgeConnecting, hasEdgeConnecting, incidentEdges, isDirected, nodeOrder, nodes, predecessors, successors
Methods inherited from class com.google.common.graph.AbstractValueGraph
edgeValue, edgeValue, equals, hashCode, toString
Methods inherited from class com.google.common.graph.AbstractBaseGraph
degree, edges, inDegree, isOrderingCompatible, nodeInvalidatableSet, nodePairInvalidatableSet, outDegree, validateEndpoints
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.common.graph.ValueGraph
degree, edges, inDegree, outDegree
-
Constructor Details
-
ImmutableValueGraph
-
-
Method Details
-
copyOf
Returns an immutable copy ofgraph
. -
copyOf
Deprecated.no need to use thisSimply returns its argument. -
incidentEdgeOrder
Description copied from interface:BaseGraph
Returns anElementOrder
that specifies the order of iteration for the elements ofBaseGraph.edges()
,BaseGraph.adjacentNodes(Object)
,BaseGraph.predecessors(Object)
,BaseGraph.successors(Object)
andBaseGraph.incidentEdges(Object)
.- Specified by:
incidentEdgeOrder
in interfaceBaseGraph<N>
- Specified by:
incidentEdgeOrder
in interfaceValueGraph<N,
V> - Overrides:
incidentEdgeOrder
in classAbstractBaseGraph<N>
-
asGraph
Description copied from interface:ValueGraph
Returns a live view of this graph as aGraph
. The resultingGraph
will have an edge connecting node A to node B if thisValueGraph
has an edge connecting A to B.- Specified by:
asGraph
in interfaceValueGraph<N,
V> - Overrides:
asGraph
in classAbstractValueGraph<N,
V>
-
getNodeConnections
private static <N,V> ImmutableMap<N,GraphConnections<N, getNodeConnectionsV>> (ValueGraph<N, V> graph) -
connectionsOf
-