Class ImmutableGroup

    • Method Detail

      • isPrototype

        public boolean isPrototype()
        Specified by:
        isPrototype in interface StructuralNode
        Returns:
        The value of the isPrototype attribute
      • getId

        public ItemId getId()
        Specified by:
        getId in interface Item
        Returns:
        The value of the id attribute
      • getType

        public String getType()
        Specified by:
        getType in interface Item
        Returns:
        The value of the type attribute
      • getValueType

        @Nullable
        public ValueType getValueType()
        Specified by:
        getValueType in interface Item
        Returns:
        The value of the valueType attribute
      • getView

        @Nullable
        public @Nullable String getView()
        Specified by:
        getView in interface DisplayItem
        Returns:
        The value of the view attribute
      • getItemsExpression

        public Expression getItemsExpression()
        Specified by:
        getItemsExpression in interface Group
        Returns:
        The value of the itemsExpression attribute
      • withIsPrototype

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

        public final ImmutableGroup withId​(ItemId value)
        Copy the current immutable object by setting a value for the id attribute. A shallow reference 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
      • withType

        public final ImmutableGroup withType​(String value)
        Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for type
        Returns:
        A modified copy of the this object
      • withValueType

        public final ImmutableGroup withValueType​(@Nullable
                                                  ValueType value)
        Copy the current immutable object by setting a value for the valueType attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for valueType (can be null)
        Returns:
        A modified copy of the this object
      • withValueSetId

        public final ImmutableGroup withValueSetId​(String value)
        Copy the current immutable object by setting a present value for the optional valueSetId attribute.
        Parameters:
        value - The value for valueSetId
        Returns:
        A modified copy of this object
      • withValueSetId

        public final ImmutableGroup withValueSetId​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the valueSetId attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for valueSetId
        Returns:
        A modified copy of this object
      • withDefaultValue

        public final ImmutableGroup withDefaultValue​(Object value)
        Copy the current immutable object by setting a present value for the optional defaultValue attribute.
        Parameters:
        value - The value for defaultValue
        Returns:
        A modified copy of this object
      • withDefaultValue

        public final ImmutableGroup withDefaultValue​(Optional<? extends Object> optional)
        Copy the current immutable object by setting an optional value for the defaultValue attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for defaultValue
        Returns:
        A modified copy of this object
      • withView

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

        public final ImmutableGroup withProps​(@Nullable
                                              @Nullable Map<String,​? extends Object> entries)
        Copy the current immutable object by replacing the props map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the props map
        Returns:
        A modified copy of this object
      • withClassName

        public final ImmutableGroup withClassName​(Expression value)
        Copy the current immutable object by setting a present value for the optional className attribute.
        Parameters:
        value - The value for className
        Returns:
        A modified copy of this object
      • withClassName

        public final ImmutableGroup withClassName​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the className attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for className
        Returns:
        A modified copy of this object
      • withActiveExpression

        public final ImmutableGroup withActiveExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional activeExpression attribute.
        Parameters:
        value - The value for activeExpression
        Returns:
        A modified copy of this object
      • withActiveExpression

        public final ImmutableGroup withActiveExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the activeExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for activeExpression
        Returns:
        A modified copy of this object
      • withRequiredExpression

        public final ImmutableGroup withRequiredExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional requiredExpression attribute.
        Parameters:
        value - The value for requiredExpression
        Returns:
        A modified copy of this object
      • withRequiredExpression

        public final ImmutableGroup withRequiredExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the requiredExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for requiredExpression
        Returns:
        A modified copy of this object
      • withDisabledExpression

        public final ImmutableGroup withDisabledExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional disabledExpression attribute.
        Parameters:
        value - The value for disabledExpression
        Returns:
        A modified copy of this object
      • withDisabledExpression

        public final ImmutableGroup withDisabledExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the disabledExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for disabledExpression
        Returns:
        A modified copy of this object
      • withLabelExpression

        public final ImmutableGroup withLabelExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional labelExpression attribute.
        Parameters:
        value - The value for labelExpression
        Returns:
        A modified copy of this object
      • withLabelExpression

        public final ImmutableGroup withLabelExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the labelExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for labelExpression
        Returns:
        A modified copy of this object
      • withDescriptionExpression

        public final ImmutableGroup withDescriptionExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional descriptionExpression attribute.
        Parameters:
        value - The value for descriptionExpression
        Returns:
        A modified copy of this object
      • withDescriptionExpression

        public final ImmutableGroup withDescriptionExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the descriptionExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for descriptionExpression
        Returns:
        A modified copy of this object
      • withErrors

        public final ImmutableGroup withErrors​(Error... elements)
        Copy the current immutable object with elements that replace the content of errors.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withErrors

        public final ImmutableGroup withErrors​(Iterable<? extends Error> elements)
        Copy the current immutable object with elements that replace the content of errors. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of errors elements to set
        Returns:
        A modified copy of this object
      • withItemsExpression

        public final ImmutableGroup withItemsExpression​(Expression value)
        Copy the current immutable object by setting a value for the itemsExpression attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for itemsExpression
        Returns:
        A modified copy of the this object
      • withAvailableItemsExpression

        public final ImmutableGroup withAvailableItemsExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional availableItemsExpression attribute.
        Parameters:
        value - The value for availableItemsExpression
        Returns:
        A modified copy of this object
      • withAvailableItemsExpression

        public final ImmutableGroup withAvailableItemsExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the availableItemsExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for availableItemsExpression
        Returns:
        A modified copy of this object
      • withIsInvalidAnswersExpression

        public final ImmutableGroup withIsInvalidAnswersExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional isInvalidAnswersExpression attribute.
        Parameters:
        value - The value for isInvalidAnswersExpression
        Returns:
        A modified copy of this object
      • withIsInvalidAnswersExpression

        public final ImmutableGroup withIsInvalidAnswersExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the isInvalidAnswersExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for isInvalidAnswersExpression
        Returns:
        A modified copy of this object
      • withAllowedActionsExpression

        public final ImmutableGroup withAllowedActionsExpression​(Expression value)
        Copy the current immutable object by setting a present value for the optional allowedActionsExpression attribute.
        Parameters:
        value - The value for allowedActionsExpression
        Returns:
        A modified copy of this object
      • withAllowedActionsExpression

        public final ImmutableGroup withAllowedActionsExpression​(Optional<? extends Expression> optional)
        Copy the current immutable object by setting an optional value for the allowedActionsExpression attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for allowedActionsExpression
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableGroup 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: isPrototype, id, type, valueType, valueSetId, defaultValue, view, props, className, activeExpression, requiredExpression, disabledExpression, labelExpression, descriptionExpression, errors, itemsExpression, availableItemsExpression, isInvalidAnswersExpression, allowedActionsExpression.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableGroup copyOf​(Group instance)
        Creates an immutable copy of a Group 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 Group instance
      • builder

        public static ImmutableGroup.Builder builder()
        Creates a builder for ImmutableGroup.
         ImmutableGroup.builder()
            .isPrototype(boolean) // optional isPrototype
            .id(io.dialob.executor.model.ItemId) // required id
            .type(String) // required type
            .valueType(io.dialob.rule.parser.api.ValueType | null) // nullable valueType
            .valueSetId(String) // optional valueSetId
            .defaultValue(Object) // optional defaultValue
            .view(String | null) // nullable view
            .props(Map&lt;String, Object&gt; | null) // nullable props
            .className(io.dialob.program.model.Expression) // optional className
            .activeExpression(io.dialob.program.model.Expression) // optional activeExpression
            .requiredExpression(io.dialob.program.model.Expression) // optional requiredExpression
            .disabledExpression(io.dialob.program.model.Expression) // optional disabledExpression
            .labelExpression(io.dialob.program.model.Expression) // optional labelExpression
            .descriptionExpression(io.dialob.program.model.Expression) // optional descriptionExpression
            .addErrors|addAllErrors(io.dialob.program.model.Error) // errors elements
            .itemsExpression(io.dialob.program.model.Expression) // required itemsExpression
            .availableItemsExpression(io.dialob.program.model.Expression) // optional availableItemsExpression
            .isInvalidAnswersExpression(io.dialob.program.model.Expression) // optional isInvalidAnswersExpression
            .allowedActionsExpression(io.dialob.program.model.Expression) // optional allowedActionsExpression
            .build();
         
        Returns:
        A new ImmutableGroup builder