Class ImmutableVariableItem.Builder

  • Enclosing class:
    ImmutableVariableItem

    @NotThreadSafe
    public static final class ImmutableVariableItem.Builder
    extends Object
    Builds instances of type ImmutableVariableItem. 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 Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder from​(StructuralNode instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.StructuralNode instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder from​(Item instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.Item instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder from​(VariableItem instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.VariableItem instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • isPrototype

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder isPrototype​(boolean isPrototype)
        Initializes the value for the isPrototype attribute.

        If not set, this attribute will have a default value as returned by the initializer of isPrototype.

        Parameters:
        isPrototype - The value for isPrototype
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder id​(ItemId id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • type

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder type​(String type)
        Initializes the value for the type attribute.
        Parameters:
        type - The value for type
        Returns:
        this builder for use in a chained invocation
      • valueSetId

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder valueSetId​(String valueSetId)
        Initializes the optional value valueSetId to valueSetId.
        Parameters:
        valueSetId - The value for valueSetId
        Returns:
        this builder for chained invocation
      • valueSetId

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder valueSetId​(Optional<String> valueSetId)
        Initializes the optional value valueSetId to valueSetId.
        Parameters:
        valueSetId - The value for valueSetId
        Returns:
        this builder for use in a chained invocation
      • defaultValue

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder defaultValue​(Object defaultValue)
        Initializes the optional value defaultValue to defaultValue.
        Parameters:
        defaultValue - The value for defaultValue
        Returns:
        this builder for chained invocation
      • defaultValue

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder defaultValue​(Optional<? extends Object> defaultValue)
        Initializes the optional value defaultValue to defaultValue.
        Parameters:
        defaultValue - The value for defaultValue
        Returns:
        this builder for use in a chained invocation
      • valueExpression

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder valueExpression​(Expression valueExpression)
        Initializes the value for the valueExpression attribute.
        Parameters:
        valueExpression - The value for valueExpression
        Returns:
        this builder for use in a chained invocation
      • isAsync

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder isAsync​(boolean isAsync)
        Initializes the value for the isAsync attribute.

        If not set, this attribute will have a default value as returned by the initializer of isAsync.

        Parameters:
        isAsync - The value for isAsync
        Returns:
        this builder for use in a chained invocation
      • isPublished

        @CanIgnoreReturnValue
        public final ImmutableVariableItem.Builder isPublished​(boolean isPublished)
        Initializes the value for the isPublished attribute.

        If not set, this attribute will have a default value as returned by the initializer of isPublished.

        Parameters:
        isPublished - The value for isPublished
        Returns:
        this builder for use in a chained invocation