Class ImmutableGraph
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.graph.Graph
com.riadalabs.jira.plugins.insight.services.model.graph.ImmutableGraph
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableGraph
extends Graph
Immutable implementation of
Graph.
Use the builder to create immutable instances:
ImmutableGraph.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableGraph.Builderbuilder()Creates a builder forImmutableGraph.static ImmutableGraphCreates an immutable copy of aGraphvalue.edges()booleanThis instance is equal to all instances ofImmutableGraphthat have equal attribute values.inthashCode()Computes a hash code from attributes:nodes,edges,incomplete.nodes()toString()Prints the immutable valueGraphwith attribute values.final ImmutableGraphwithEdges(Collection<Edge> value) Copy the current immutable object by setting a value for theedgesattribute.final ImmutableGraphwithIncomplete(boolean value) Copy the current immutable object by setting a present value for the optionalincompleteattribute.final ImmutableGraphwithIncomplete(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theincompleteattribute.final ImmutableGraphwithNodes(Collection<Node> value) Copy the current immutable object by setting a value for thenodesattribute.
-
Method Details
-
nodes
-
edges
-
isIncomplete
- Specified by:
isIncompletein classGraph- Returns:
- The value of the
incompleteattribute
-
withNodes
Copy the current immutable object by setting a value for thenodesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nodes- Returns:
- A modified copy of the
thisobject
-
withEdges
Copy the current immutable object by setting a value for theedgesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for edges- Returns:
- A modified copy of the
thisobject
-
withIncomplete
Copy the current immutable object by setting a present value for the optionalincompleteattribute.- Parameters:
value- The value for incomplete- Returns:
- A modified copy of
thisobject
-
withIncomplete
Copy the current immutable object by setting an optional value for theincompleteattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for incomplete- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableGraphthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nodes,edges,incomplete. -
toString
Prints the immutable valueGraphwith attribute values. -
copyOf
Creates an immutable copy of aGraphvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Graph instance
-
builder
Creates a builder forImmutableGraph.ImmutableGraph.builder() .setNodes(Collection<com.riadalabs.jira.plugins.insight.services.model.graph.Node>) // requirednodes.setEdges(Collection<com.riadalabs.jira.plugins.insight.services.model.graph.Edge>) // requirededges.setIncomplete(Boolean) // optionalincomplete.build();- Returns:
- A new ImmutableGraph builder
-