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 classBuilds instances of typeImmutableObjectNode. -
Method Summary
Modifier and TypeMethodDescriptionavatar()static ImmutableObjectNode.Builderbuilder()Creates a builder forImmutableObjectNode.booleanstatic ImmutableObjectNodecopyOf(ObjectNode instance) Creates an immutable copy of aObjectNodevalue.intdepth()booleanThis instance is equal to all instances ofImmutableObjectNodethat have equal attribute values.booleanexpanded()inthashCode()Computes a hash code from attributes:id.intid()object()toString()Prints the immutable valueObjectNodewith attribute values.final ImmutableObjectNodewithAvatar(AvatarBean value) Copy the current immutable object by setting a value for theavatarattribute.final ImmutableObjectNodewithCanCreateReference(boolean value) Copy the current immutable object by setting a value for thecanCreateReferenceattribute.final ImmutableObjectNodewithDepth(int value) Copy the current immutable object by setting a value for thedepthattribute.final ImmutableObjectNodewithExpanded(boolean value) Copy the current immutable object by setting a value for theexpandedattribute.final ImmutableObjectNodewithId(int value) Copy the current immutable object by setting a value for theidattribute.final ImmutableObjectNodewithObject(ObjectBean value) Copy the current immutable object by setting a value for theobjectattribute.final ImmutableObjectNodewithObjectTypeAttributeId(Integer value) Copy the current immutable object by setting a value for theobjectTypeAttributeIdattribute.
-
Method Details
-
id
public int id() -
canCreateReference
public boolean canCreateReference()- Specified by:
canCreateReferencein classNode- Returns:
- The value of the
canCreateReferenceattribute
-
depth
public int depth() -
expanded
public boolean expanded() -
object
- Specified by:
objectin classObjectNode- Returns:
- The value of the
objectattribute
-
avatar
- Specified by:
avatarin classObjectNode- Returns:
- The value of the
avatarattribute
-
objectTypeAttributeId
- Specified by:
objectTypeAttributeIdin classObjectNode- Returns:
- The value of the
objectTypeAttributeIdattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withCanCreateReference
Copy the current immutable object by setting a value for thecanCreateReferenceattribute. 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
thisobject
-
withDepth
Copy the current immutable object by setting a value for thedepthattribute. 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
thisobject
-
withExpanded
Copy the current immutable object by setting a value for theexpandedattribute. 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
thisobject
-
withObject
Copy the current immutable object by setting a value for theobjectattribute. 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
thisobject
-
withAvatar
Copy the current immutable object by setting a value for theavatarattribute. 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
thisobject
-
withObjectTypeAttributeId
Copy the current immutable object by setting a value for theobjectTypeAttributeIdattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableObjectNodethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id. -
toString
Prints the immutable valueObjectNodewith attribute values. -
copyOf
Creates an immutable copy of aObjectNodevalue. 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) // requiredid.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
-