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 classA builder for creatingImmutableValueGraphinstances, especiallystatic finalgraphs. -
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 anElementOrderthat 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, successorsMethods inherited from class com.google.common.graph.AbstractValueGraph
edgeValue, edgeValue, equals, hashCode, toStringMethods inherited from class com.google.common.graph.AbstractBaseGraph
degree, edges, inDegree, isOrderingCompatible, outDegree, validateEndpointsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:BaseGraphReturns anElementOrderthat specifies the order of iteration for the elements ofBaseGraph.edges(),BaseGraph.adjacentNodes(Object),BaseGraph.predecessors(Object),BaseGraph.successors(Object)andBaseGraph.incidentEdges(Object).- Specified by:
incidentEdgeOrderin interfaceBaseGraph<N>- Specified by:
incidentEdgeOrderin interfaceValueGraph<N,V> - Overrides:
incidentEdgeOrderin classAbstractBaseGraph<N>
-
asGraph
Description copied from interface:ValueGraphReturns a live view of this graph as aGraph. The resultingGraphwill have an edge connecting node A to node B if thisValueGraphhas an edge connecting A to B.- Specified by:
asGraphin interfaceValueGraph<N,V> - Overrides:
asGraphin classAbstractValueGraph<N,V>
-
getNodeConnections
private static <N,V> ImmutableMap<N,GraphConnections<N, getNodeConnectionsV>> (ValueGraph<N, V> graph) -
connectionsOf
-