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.Builder
builder()
Creates a builder forImmutableGraph
.static ImmutableGraph
Creates an immutable copy of aGraph
value.edges()
boolean
This instance is equal to all instances ofImmutableGraph
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:nodes
,edges
,incomplete
.nodes()
toString()
Prints the immutable valueGraph
with attribute values.final ImmutableGraph
withEdges
(Collection<Edge> value) Copy the current immutable object by setting a value for theedges
attribute.final ImmutableGraph
withIncomplete
(boolean value) Copy the current immutable object by setting a present value for the optionalincomplete
attribute.final ImmutableGraph
withIncomplete
(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theincomplete
attribute.final ImmutableGraph
withNodes
(Collection<Node> value) Copy the current immutable object by setting a value for thenodes
attribute.
-
Method Details
-
nodes
-
edges
-
isIncomplete
- Specified by:
isIncomplete
in classGraph
- Returns:
- The value of the
incomplete
attribute
-
withNodes
Copy the current immutable object by setting a value for thenodes
attribute. 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
this
object
-
withEdges
Copy the current immutable object by setting a value for theedges
attribute. 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
this
object
-
withIncomplete
Copy the current immutable object by setting a present value for the optionalincomplete
attribute.- Parameters:
value
- The value for incomplete- Returns:
- A modified copy of
this
object
-
withIncomplete
Copy the current immutable object by setting an optional value for theincomplete
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableGraph
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nodes
,edges
,incomplete
. -
toString
Prints the immutable valueGraph
with attribute values. -
copyOf
Creates an immutable copy of aGraph
value. 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>) // required
nodes
.setEdges(Collection<com.riadalabs.jira.plugins.insight.services.model.graph.Edge>) // requirededges
.setIncomplete(Boolean) // optionalincomplete
.build();- Returns:
- A new ImmutableGraph builder
-