@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGraph extends Graph
Graph
.
Use the builder to create immutable instances:
ImmutableGraph.builder()
.
Modifier and Type | Class and Description |
---|---|
static class |
ImmutableGraph.Builder
Builds instances of type
ImmutableGraph . |
Modifier and Type | Method and Description |
---|---|
static ImmutableGraph.Builder |
builder()
Creates a builder for
ImmutableGraph . |
static ImmutableGraph |
copyOf(Graph instance)
Creates an immutable copy of a
Graph value. |
Collection<Edge> |
edges() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableGraph that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
nodes , edges , incomplete . |
Optional<Boolean> |
isIncomplete() |
Collection<Node> |
nodes() |
String |
toString()
Prints the immutable value
Graph with attribute values. |
ImmutableGraph |
withEdges(Collection<Edge> value)
Copy the current immutable object by setting a value for the
edges attribute. |
ImmutableGraph |
withIncomplete(boolean value)
Copy the current immutable object by setting a present value for the optional
incomplete attribute. |
ImmutableGraph |
withIncomplete(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for the
incomplete attribute. |
ImmutableGraph |
withNodes(Collection<Node> value)
Copy the current immutable object by setting a value for the
nodes attribute. |
public Collection<Node> nodes()
public Collection<Edge> edges()
public Optional<Boolean> isIncomplete()
isIncomplete
in class Graph
incomplete
attributepublic final ImmutableGraph withNodes(Collection<Node> value)
nodes
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for nodesthis
objectpublic final ImmutableGraph withEdges(Collection<Edge> value)
edges
attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this
.value
- A new value for edgesthis
objectpublic final ImmutableGraph withIncomplete(boolean value)
incomplete
attribute.value
- The value for incompletethis
objectpublic final ImmutableGraph withIncomplete(Optional<Boolean> optional)
incomplete
attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this
.optional
- A value for incompletethis
objectpublic boolean equals(@Nullable Object another)
ImmutableGraph
that have equal attribute values.public int hashCode()
nodes
, edges
, incomplete
.public String toString()
Graph
with attribute values.public static ImmutableGraph copyOf(Graph instance)
Graph
value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance
- The instance to copypublic static ImmutableGraph.Builder builder()
ImmutableGraph
.
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();
Copyright © 2024 Atlassian. All rights reserved.