Class ImmutableGroup.Builder

  • Enclosing class:
    ImmutableGroup

    @NotThreadSafe
    public static final class ImmutableGroup.Builder
    extends Object
    Builds instances of type ImmutableGroup. 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 ImmutableGroup.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 ImmutableGroup.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 ImmutableGroup.Builder from​(DisplayItem instance)
        Fill a builder with attribute values from the provided io.dialob.program.model.DisplayItem instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

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

        @CanIgnoreReturnValue
        public final ImmutableGroup.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 ImmutableGroup.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 ImmutableGroup.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
      • valueType

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder valueType​(@Nullable
                                                      ValueType valueType)
        Initializes the value for the valueType attribute.
        Parameters:
        valueType - The value for valueType (can be null)
        Returns:
        this builder for use in a chained invocation
      • valueSetId

        @CanIgnoreReturnValue
        public final ImmutableGroup.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 ImmutableGroup.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 ImmutableGroup.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 ImmutableGroup.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
      • view

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder view​(@Nullable
                                                 @Nullable String view)
        Initializes the value for the view attribute.
        Parameters:
        view - The value for view (can be null)
        Returns:
        this builder for use in a chained invocation
      • putProps

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder putProps​(@Nullable
                                                     String key,
                                                     @Nullable
                                                     Object value)
        Put one entry to the props map.
        Parameters:
        key - The key in the props map
        value - The associated value in the props map
        Returns:
        this builder for use in a chained invocation
      • putProps

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder putProps​(Map.Entry<String,​? extends Object> entry)
        Put one entry to the props map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • props

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder props​(@Nullable
                                                  @Nullable Map<String,​? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the props map. Nulls are not permitted as keys or values, but parameter itself can be null
        Parameters:
        entries - The entries that will be added to the props map
        Returns:
        this builder for use in a chained invocation
      • putAllProps

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder putAllProps​(Map<String,​? extends Object> entries)
        Put all mappings from the specified map as entries to props map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the props map
        Returns:
        this builder for use in a chained invocation
      • className

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

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

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

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

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

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

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

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

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

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

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

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

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder addErrors​(Error element)
        Adds one element to errors list.
        Parameters:
        element - A errors element
        Returns:
        this builder for use in a chained invocation
      • addErrors

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder addErrors​(Error... elements)
        Adds elements to errors list.
        Parameters:
        elements - An array of errors elements
        Returns:
        this builder for use in a chained invocation
      • errors

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder errors​(Iterable<? extends Error> elements)
        Sets or replaces all elements for errors list.
        Parameters:
        elements - An iterable of errors elements
        Returns:
        this builder for use in a chained invocation
      • addAllErrors

        @CanIgnoreReturnValue
        public final ImmutableGroup.Builder addAllErrors​(Iterable<? extends Error> elements)
        Adds elements to errors list.
        Parameters:
        elements - An iterable of errors elements
        Returns:
        this builder for use in a chained invocation
      • itemsExpression

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

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

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

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

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

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

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