Class ImmutableObjectNode.Builder

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.graph.ImmutableObjectNode.Builder
Enclosing class:
ImmutableObjectNode

@NotThreadSafe public static final class ImmutableObjectNode.Builder extends Object
Builds instances of type ImmutableObjectNode. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder from(ObjectNode instance)
      Fill a builder with attribute values from the provided com.riadalabs.jira.plugins.insight.services.model.graph.ObjectNode instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder from(Node instance)
      Fill a builder with attribute values from the provided com.riadalabs.jira.plugins.insight.services.model.graph.Node instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setId

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setId(int id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • setCanCreateReference

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setCanCreateReference(boolean canCreateReference)
      Initializes the value for the canCreateReference attribute.
      Parameters:
      canCreateReference - The value for canCreateReference
      Returns:
      this builder for use in a chained invocation
    • setDepth

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setDepth(int depth)
      Initializes the value for the depth attribute.
      Parameters:
      depth - The value for depth
      Returns:
      this builder for use in a chained invocation
    • setExpanded

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setExpanded(boolean expanded)
      Initializes the value for the expanded attribute.
      Parameters:
      expanded - The value for expanded
      Returns:
      this builder for use in a chained invocation
    • setObject

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setObject(ObjectBean object)
      Initializes the value for the object attribute.
      Parameters:
      object - The value for object
      Returns:
      this builder for use in a chained invocation
    • setAvatar

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setAvatar(AvatarBean avatar)
      Initializes the value for the avatar attribute.
      Parameters:
      avatar - The value for avatar
      Returns:
      this builder for use in a chained invocation
    • setObjectTypeAttributeId

      @CanIgnoreReturnValue public final ImmutableObjectNode.Builder setObjectTypeAttributeId(@Nullable Integer objectTypeAttributeId)
      Initializes the value for the objectTypeAttributeId attribute.
      Parameters:
      objectTypeAttributeId - The value for objectTypeAttributeId (can be null)
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableObjectNode build()
      Builds a new ImmutableObjectNode.
      Returns:
      An immutable instance of ObjectNode
      Throws:
      IllegalStateException - if any required attributes are missing