@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableSubGraph<T> extends Object implements GraphAsDot.SubGraph<T>
GraphAsDot.SubGraph.
Use the builder to create immutable instances:
ImmutableSubGraph.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableSubGraph.Builder<T>
Builds instances of type
ImmutableSubGraph. |
| Modifier and Type | Method and Description |
|---|---|
static <T> ImmutableSubGraph.Builder<T> |
builder(org.jgrapht.Graph<T,?> graph)
Creates a builder for
ImmutableSubGraph. |
Map<T,T> |
connections() |
static <T> ImmutableSubGraph<T> |
copyOf(GraphAsDot.SubGraph<T> instance)
Creates an immutable copy of a
GraphAsDot.SubGraph value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableSubGraph that have equal attribute values. |
org.jgrapht.Graph<T,?> |
graph() |
int |
hashCode()
Computes a hash code from attributes:
graph, connections. |
String |
toString()
Prints the immutable value
SubGraph with attribute values. |
ImmutableSubGraph<T> |
withConnections(Map<? extends T,? extends T> entries)
Copy the current immutable object by replacing the
connections map with the specified map. |
ImmutableSubGraph<T> |
withGraph(org.jgrapht.Graph<T,?> value)
Copy the current immutable object by setting a value for the
graph attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitofpublic org.jgrapht.Graph<T,?> graph()
graph in interface GraphAsDot.SubGraph<T>graph attributepublic Map<T,T> connections()
connections in interface GraphAsDot.SubGraph<T>connections attributepublic final ImmutableSubGraph<T> withGraph(org.jgrapht.Graph<T,?> value)
graph attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for graphthis objectpublic final ImmutableSubGraph<T> withConnections(Map<? extends T,? extends T> entries)
connections map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the connections mapthis objectpublic boolean equals(Object another)
ImmutableSubGraph that have equal attribute values.public int hashCode()
graph, connections.public String toString()
SubGraph with attribute values.public static <T> ImmutableSubGraph<T> copyOf(GraphAsDot.SubGraph<T> instance)
GraphAsDot.SubGraph value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter Tinstance - The instance to copypublic static <T> ImmutableSubGraph.Builder<T> builder(org.jgrapht.Graph<T,?> graph)
ImmutableSubGraph.
ImmutableSubGraph.<T>builder()
.graph(org.jgrapht.Graph<T, ?>) // required graph
.putConnections|putAllConnections(T => T) // connections mappings
.build();
T - generic parameter Tgraph - graph parameterCopyright © 2023. All rights reserved.