Class ImmutableObjectNode
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.graph.Node
com.riadalabs.jira.plugins.insight.services.model.graph.ObjectNode
com.riadalabs.jira.plugins.insight.services.model.graph.ImmutableObjectNode
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableObjectNode
extends ObjectNode
Immutable implementation of
ObjectNode
.
Use the builder to create immutable instances:
ImmutableObjectNode.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableObjectNode
. -
Method Summary
Modifier and TypeMethodDescriptionavatar()
static ImmutableObjectNode.Builder
builder()
Creates a builder forImmutableObjectNode
.boolean
static ImmutableObjectNode
copyOf
(ObjectNode instance) Creates an immutable copy of aObjectNode
value.int
depth()
boolean
This instance is equal to all instances ofImmutableObjectNode
that have equal attribute values.boolean
expanded()
int
hashCode()
Computes a hash code from attributes:id
.int
id()
object()
toString()
Prints the immutable valueObjectNode
with attribute values.final ImmutableObjectNode
withAvatar
(AvatarBean value) Copy the current immutable object by setting a value for theavatar
attribute.final ImmutableObjectNode
withCanCreateReference
(boolean value) Copy the current immutable object by setting a value for thecanCreateReference
attribute.final ImmutableObjectNode
withDepth
(int value) Copy the current immutable object by setting a value for thedepth
attribute.final ImmutableObjectNode
withExpanded
(boolean value) Copy the current immutable object by setting a value for theexpanded
attribute.final ImmutableObjectNode
withId
(int value) Copy the current immutable object by setting a value for theid
attribute.final ImmutableObjectNode
withObject
(ObjectBean value) Copy the current immutable object by setting a value for theobject
attribute.final ImmutableObjectNode
withObjectTypeAttributeId
(Integer value) Copy the current immutable object by setting a value for theobjectTypeAttributeId
attribute.
-
Method Details
-
id
public int id() -
canCreateReference
public boolean canCreateReference()- Specified by:
canCreateReference
in classNode
- Returns:
- The value of the
canCreateReference
attribute
-
depth
public int depth() -
expanded
public boolean expanded() -
object
- Specified by:
object
in classObjectNode
- Returns:
- The value of the
object
attribute
-
avatar
- Specified by:
avatar
in classObjectNode
- Returns:
- The value of the
avatar
attribute
-
objectTypeAttributeId
- Specified by:
objectTypeAttributeId
in classObjectNode
- Returns:
- The value of the
objectTypeAttributeId
attribute
-
withId
Copy the current immutable object by setting a value for theid
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withCanCreateReference
Copy the current immutable object by setting a value for thecanCreateReference
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for canCreateReference- Returns:
- A modified copy of the
this
object
-
withDepth
Copy the current immutable object by setting a value for thedepth
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for depth- Returns:
- A modified copy of the
this
object
-
withExpanded
Copy the current immutable object by setting a value for theexpanded
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for expanded- Returns:
- A modified copy of the
this
object
-
withObject
Copy the current immutable object by setting a value for theobject
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for object- Returns:
- A modified copy of the
this
object
-
withAvatar
Copy the current immutable object by setting a value for theavatar
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for avatar- Returns:
- A modified copy of the
this
object
-
withObjectTypeAttributeId
Copy the current immutable object by setting a value for theobjectTypeAttributeId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for objectTypeAttributeId (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableObjectNode
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id
. -
toString
Prints the immutable valueObjectNode
with attribute values. -
copyOf
Creates an immutable copy of aObjectNode
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 ObjectNode instance
-
builder
Creates a builder forImmutableObjectNode
.ImmutableObjectNode.builder() .setId(int) // required
id
.setCanCreateReference(boolean) // requiredcanCreateReference
.setDepth(int) // requireddepth
.setExpanded(boolean) // requiredexpanded
.setObject(com.riadalabs.jira.plugins.insight.services.model.ObjectBean) // requiredobject
.setAvatar(com.riadalabs.jira.plugins.insight.services.model.AvatarBean) // requiredavatar
.setObjectTypeAttributeId(Integer | null) // nullableobjectTypeAttributeId
.build();- Returns:
- A new ImmutableObjectNode builder
-