Class 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().

  • Method Details

    • id

      public int id()
      Specified by:
      id in class Node
      Returns:
      The value of the id attribute
    • canCreateReference

      public boolean canCreateReference()
      Specified by:
      canCreateReference in class Node
      Returns:
      The value of the canCreateReference attribute
    • depth

      public int depth()
      Specified by:
      depth in class Node
      Returns:
      The value of the depth attribute
    • expanded

      public boolean expanded()
      Specified by:
      expanded in class Node
      Returns:
      The value of the expanded attribute
    • object

      public ObjectBean object()
      Specified by:
      object in class ObjectNode
      Returns:
      The value of the object attribute
    • avatar

      public AvatarBean avatar()
      Specified by:
      avatar in class ObjectNode
      Returns:
      The value of the avatar attribute
    • objectTypeAttributeId

      @Nullable public Integer objectTypeAttributeId()
      Specified by:
      objectTypeAttributeId in class ObjectNode
      Returns:
      The value of the objectTypeAttributeId attribute
    • withId

      public final ImmutableObjectNode withId(int value)
      Copy the current immutable object by setting a value for the id attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withCanCreateReference

      public final ImmutableObjectNode withCanCreateReference(boolean value)
      Copy the current immutable object by setting a value for the canCreateReference attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for canCreateReference
      Returns:
      A modified copy of the this object
    • withDepth

      public final ImmutableObjectNode withDepth(int value)
      Copy the current immutable object by setting a value for the depth attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for depth
      Returns:
      A modified copy of the this object
    • withExpanded

      public final ImmutableObjectNode withExpanded(boolean value)
      Copy the current immutable object by setting a value for the expanded attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for expanded
      Returns:
      A modified copy of the this object
    • withObject

      public final ImmutableObjectNode withObject(ObjectBean value)
      Copy the current immutable object by setting a value for the object attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for object
      Returns:
      A modified copy of the this object
    • withAvatar

      public final ImmutableObjectNode withAvatar(AvatarBean value)
      Copy the current immutable object by setting a value for the avatar attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for avatar
      Returns:
      A modified copy of the this object
    • withObjectTypeAttributeId

      public final ImmutableObjectNode withObjectTypeAttributeId(@Nullable Integer value)
      Copy the current immutable object by setting a value for the objectTypeAttributeId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for objectTypeAttributeId (can be null)
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableObjectNode that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: id.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ObjectNode with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableObjectNode copyOf(ObjectNode instance)
      Creates an immutable copy of a ObjectNode 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

      public static ImmutableObjectNode.Builder builder()
      Creates a builder for ImmutableObjectNode.
       ImmutableObjectNode.builder()
          .setId(int) // required id
          .setCanCreateReference(boolean) // required canCreateReference
          .setDepth(int) // required depth
          .setExpanded(boolean) // required expanded
          .setObject(com.riadalabs.jira.plugins.insight.services.model.ObjectBean) // required object
          .setAvatar(com.riadalabs.jira.plugins.insight.services.model.AvatarBean) // required avatar
          .setObjectTypeAttributeId(Integer | null) // nullable objectTypeAttributeId
          .build();
       
      Returns:
      A new ImmutableObjectNode builder