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 |
|---|---|
| public static class | ImmutableValueGraph.
A builder for creating |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableGraph | asGraph()
Overrides com. Implements com. Graph.
|
| private static <N, V> GraphConnections | |
| public static <N, V> ImmutableValueGraph | |
| public static <N, V> ImmutableValueGraph | |
| private static <N, V> ImmutableMap | |
| public ElementOrder | incidentEdgeOrder()
Overrides com. Implements com. ElementOrder that specifies the order of iteration for the elements of
edges(), adjacentNodes(Object), predecessors(Object), successors(Object) and incidentEdges(Object).
|
| ImmutableValueGraph | back to summary |
|---|---|
| private ImmutableValueGraph(ValueGraph<N, V> graph) | |
| asGraph | back to summary |
|---|---|
| public ImmutableGraph Overrides com. Implements com. Doc from com. Returns a live view of this graph as a
| |
| connectionsOf | back to summary |
|---|---|
| private static <N, V> GraphConnections | |
| copyOf | back to summary |
|---|---|
| public static <N, V> ImmutableValueGraph Returns an immutable copy of | |
| copyOf | back to summary |
|---|---|
| public static <N, V> ImmutableValueGraph Deprecated no need to use this Simply returns its argument.
| |
| getNodeConnections | back to summary |
|---|---|
| private static <N, V> ImmutableMap | |
| incidentEdgeOrder | back to summary |
|---|---|
| public ElementOrder Overrides com. Implements com. Doc from com. Returns an
| |
ImmutableValueGraph instances, especially static final
graphs. Example:
static final ImmutableValueGraph<City, Distance> CITY_ROAD_DISTANCE_GRAPH =
ValueGraphBuilder.undirected()
.<City, Distance>immutable()
.putEdgeValue(PARIS, BERLIN, kilometers(1060))
.putEdgeValue(PARIS, BRUSSELS, kilometers(317))
.putEdgeValue(BERLIN, BRUSSELS, kilometers(764))
.addNode(REYKJAVIK)
.build();
Builder instances can be reused; it is safe to call build multiple times to build
multiple graphs in series. Each new graph contains all the elements of the ones created before
it.
| Modifier and Type | Field and Description |
|---|---|
| private final MutableValueGraph |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableValueGraph. | |
| public ImmutableValueGraph | |
| public ImmutableValueGraph. | Returns: thisBuilder objectAdds an edge connecting |
| public ImmutableValueGraph. | Returns: thisBuilder objectAdds an edge connecting |
| mutableValueGraph | back to summary |
|---|---|
| private final MutableValueGraph<N, V> mutableValueGraph | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(ValueGraphBuilder<N, V> graphBuilder) | |
| addNode | back to summary |
|---|---|
| public ImmutableValueGraph. Adds Nodes must be unique, just as
| |
| build | back to summary |
|---|---|
| public ImmutableValueGraph Returns a newly-created | |
| putEdgeValue | back to summary |
|---|---|
| public ImmutableValueGraph. Adds an edge connecting If the graph is directed, the resultant edge will be directed; otherwise, it will be undirected. Values do not have to be unique. However, values must be non-null. If
| |
| putEdgeValue | back to summary |
|---|---|
| public ImmutableValueGraph. Adds an edge connecting If the graph is directed, the resultant edge will be directed; otherwise, it will be undirected. If this graph is directed, Values do not have to be unique. However, values must be non-null. If either or both endpoints are not already present in this graph, this method will
silently
| |