Package com.google.common.graph
Class ImmutableGraph<N>
java.lang.Object
com.google.common.graph.AbstractBaseGraph<N>
com.google.common.graph.AbstractGraph<N>
com.google.common.graph.ForwardingGraph<N>
com.google.common.graph.ImmutableGraph<N>
- Type Parameters:
N- Node parameter type
- All Implemented Interfaces:
BaseGraph<N>,Graph<N>,PredecessorsFunction<N>,SuccessorsFunction<N>
A
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.
- Since:
- 20.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for creatingImmutableGraphinstances, especiallystatic finalgraphs. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <N> GraphConnections<N, GraphConstants.Presence> connectionsOf(Graph<N> graph, N node) static <N> ImmutableGraph<N> Returns an immutable copy ofgraph.static <N> ImmutableGraph<N> copyOf(ImmutableGraph<N> graph) Deprecated.no need to use thisdelegate()private static <N> ImmutableMap<N, GraphConnections<N, GraphConstants.Presence>> getNodeConnections(Graph<N> 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.ForwardingGraph
adjacentNodes, allowsSelfLoops, degree, edgeCount, hasEdgeConnecting, hasEdgeConnecting, incidentEdges, inDegree, isDirected, nodeOrder, nodes, outDegree, predecessors, successorsMethods inherited from class com.google.common.graph.AbstractGraph
equals, hashCode, toStringMethods inherited from class com.google.common.graph.AbstractBaseGraph
edges, isOrderingCompatible, nodeInvalidatableSet, nodePairInvalidatableSet, validateEndpoints
-
Field Details
-
backingGraph
-
-
Constructor Details
-
ImmutableGraph
-
-
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 interfaceGraph<N>- Overrides:
incidentEdgeOrderin classForwardingGraph<N>
-
getNodeConnections
private static <N> ImmutableMap<N,GraphConnections<N, getNodeConnectionsGraphConstants.Presence>> (Graph<N> graph) -
connectionsOf
private static <N> GraphConnections<N,GraphConstants.Presence> connectionsOf(Graph<N> graph, N node) -
delegate
- Specified by:
delegatein classForwardingGraph<N>
-