Class ImmutableFormItem
java.lang.Object
io.dialob.session.engine.program.model.ImmutableFormItem
- All Implemented Interfaces:
DisplayItem,FormItem,Item,ProgramNode,StructuralNode,Serializable
@Generated(from="FormItem",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableFormItem
extends Object
implements FormItem
Immutable implementation of
FormItem.
Use the builder to create immutable instances:
ImmutableFormItem.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableFormItem.Builderbuilder()Creates a builder forImmutableFormItem.static ImmutableFormItemCreates an immutable copy of aFormItemvalue.booleanThis instance is equal to all instances ofImmutableFormItemthat have equal attribute values.getId()getProps()getType()getView()inthashCode()Computes a hash code from attributes:isPrototype,id,type,valueType,valueSetId,defaultValue,view,props,className,activeExpression,requiredExpression,disabledExpression,labelExpression,descriptionExpression,errors.booleantoString()Prints the immutable valueFormItemwith attribute values.final ImmutableFormItemwithActiveExpression(Expression value) Copy the current immutable object by setting a present value for the optionalactiveExpressionattribute.final ImmutableFormItemwithActiveExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for theactiveExpressionattribute.final ImmutableFormItemwithClassName(Expression value) Copy the current immutable object by setting a present value for the optionalclassNameattribute.final ImmutableFormItemwithClassName(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for theclassNameattribute.final ImmutableFormItemwithDefaultValue(Object value) Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.final ImmutableFormItemwithDefaultValue(Optional<? extends Object> optional) Copy the current immutable object by setting an optional value for thedefaultValueattribute.final ImmutableFormItemCopy the current immutable object by setting a present value for the optionaldescriptionExpressionattribute.final ImmutableFormItemwithDescriptionExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thedescriptionExpressionattribute.final ImmutableFormItemwithDisabledExpression(Expression value) Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.final ImmutableFormItemwithDisabledExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thedisabledExpressionattribute.final ImmutableFormItemwithErrors(Error... elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableFormItemwithErrors(Iterable<? extends Error> elements) Copy the current immutable object with elements that replace the content oferrors.final ImmutableFormItemCopy the current immutable object by setting a value for theidattribute.final ImmutableFormItemwithIsPrototype(boolean value) Copy the current immutable object by setting a value for theisPrototypeattribute.final ImmutableFormItemwithLabelExpression(Expression value) Copy the current immutable object by setting a present value for the optionallabelExpressionattribute.final ImmutableFormItemwithLabelExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thelabelExpressionattribute.final ImmutableFormItemCopy the current immutable object by replacing thepropsmap with the specified map.final ImmutableFormItemwithRequiredExpression(Expression value) Copy the current immutable object by setting a present value for the optionalrequiredExpressionattribute.final ImmutableFormItemwithRequiredExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for therequiredExpressionattribute.final ImmutableFormItemCopy the current immutable object by setting a value for thetypeattribute.final ImmutableFormItemwithValueSetId(String value) Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.final ImmutableFormItemwithValueSetId(Optional<String> optional) Copy the current immutable object by setting an optional value for thevalueSetIdattribute.final ImmutableFormItemwithValueType(ValueType value) Copy the current immutable object by setting a value for thevalueTypeattribute.final ImmutableFormItemCopy the current immutable object by setting a value for theviewattribute.
-
Method Details
-
isPrototype
public boolean isPrototype()- Specified by:
isPrototypein interfaceStructuralNode- Returns:
- The value of the
isPrototypeattribute
-
getId
-
getType
-
getValueType
- Specified by:
getValueTypein interfaceItem- Returns:
- The value of the
valueTypeattribute
-
getValueSetId
- Specified by:
getValueSetIdin interfaceItem- Returns:
- The value of the
valueSetIdattribute
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceItem- Returns:
- The value of the
defaultValueattribute
-
getView
- Specified by:
getViewin interfaceDisplayItem- Returns:
- The value of the
viewattribute
-
getProps
- Specified by:
getPropsin interfaceDisplayItem- Returns:
- The value of the
propsattribute
-
getClassName
- Specified by:
getClassNamein interfaceDisplayItem- Returns:
- The value of the
classNameattribute
-
getActiveExpression
- Specified by:
getActiveExpressionin interfaceDisplayItem- Returns:
- The value of the
activeExpressionattribute
-
getRequiredExpression
- Specified by:
getRequiredExpressionin interfaceDisplayItem- Returns:
- The value of the
requiredExpressionattribute
-
getDisabledExpression
- Specified by:
getDisabledExpressionin interfaceDisplayItem- Returns:
- The value of the
disabledExpressionattribute
-
getLabelExpression
- Specified by:
getLabelExpressionin interfaceDisplayItem- Returns:
- The value of the
labelExpressionattribute
-
getDescriptionExpression
- Specified by:
getDescriptionExpressionin interfaceDisplayItem- Returns:
- The value of the
descriptionExpressionattribute
-
getErrors
- Specified by:
getErrorsin interfaceDisplayItem- Returns:
- The value of the
errorsattribute
-
withIsPrototype
Copy the current immutable object by setting a value for theisPrototypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isPrototype- Returns:
- A modified copy or the
thisobject
-
withId
Copy the current immutable object by setting a value for theidattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy or the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withValueType
Copy the current immutable object by setting a value for thevalueTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueType (can benull)- Returns:
- A modified copy or the
thisobject
-
withValueSetId
Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.- Parameters:
value- The value for valueSetId- Returns:
- A modified copy or
thisif not changed
-
withValueSetId
Copy the current immutable object by setting an optional value for thevalueSetIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for valueSetId- Returns:
- A modified copy or
thisif not changed
-
withDefaultValue
Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.- Parameters:
value- The value for defaultValue- Returns:
- A modified copy or
thisif not changed
-
withDefaultValue
Copy the current immutable object by setting an optional value for thedefaultValueattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for defaultValue- Returns:
- A modified copy or
thisif not changed
-
withView
Copy the current immutable object by setting a value for theviewattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for view (can benull)- Returns:
- A modified copy or the
thisobject
-
withProps
Copy the current immutable object by replacing thepropsmap 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 returningthis.- Parameters:
entries- The entries to replace the props map- Returns:
- A modified copy or
thisif not changed
-
withClassName
Copy the current immutable object by setting a present value for the optionalclassNameattribute.- Parameters:
value- The value for className- Returns:
- A modified copy or
thisif not changed
-
withClassName
Copy the current immutable object by setting an optional value for theclassNameattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for className- Returns:
- A modified copy or
thisif not changed
-
withActiveExpression
Copy the current immutable object by setting a present value for the optionalactiveExpressionattribute.- Parameters:
value- The value for activeExpression- Returns:
- A modified copy or
thisif not changed
-
withActiveExpression
Copy the current immutable object by setting an optional value for theactiveExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for activeExpression- Returns:
- A modified copy or
thisif not changed
-
withRequiredExpression
Copy the current immutable object by setting a present value for the optionalrequiredExpressionattribute.- Parameters:
value- The value for requiredExpression- Returns:
- A modified copy or
thisif not changed
-
withRequiredExpression
Copy the current immutable object by setting an optional value for therequiredExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for requiredExpression- Returns:
- A modified copy or
thisif not changed
-
withDisabledExpression
Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.- Parameters:
value- The value for disabledExpression- Returns:
- A modified copy or
thisif not changed
-
withDisabledExpression
Copy the current immutable object by setting an optional value for thedisabledExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for disabledExpression- Returns:
- A modified copy or
thisif not changed
-
withLabelExpression
Copy the current immutable object by setting a present value for the optionallabelExpressionattribute.- Parameters:
value- The value for labelExpression- Returns:
- A modified copy or
thisif not changed
-
withLabelExpression
Copy the current immutable object by setting an optional value for thelabelExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for labelExpression- Returns:
- A modified copy or
thisif not changed
-
withDescriptionExpression
Copy the current immutable object by setting a present value for the optionaldescriptionExpressionattribute.- Parameters:
value- The value for descriptionExpression- Returns:
- A modified copy or
thisif not changed
-
withDescriptionExpression
Copy the current immutable object by setting an optional value for thedescriptionExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for descriptionExpression- Returns:
- A modified copy or
thisif not changed
-
withErrors
Copy the current immutable object with elements that replace the content oferrors.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withErrors
Copy the current immutable object with elements that replace the content oferrors. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of errors elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableFormItemthat have equal attribute values. -
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. -
toString
Prints the immutable valueFormItemwith attribute values. -
copyOf
Creates an immutable copy of aFormItemvalue. 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 FormItem instance
-
builder
Creates a builder forImmutableFormItem.ImmutableFormItem.builder() .isPrototype(boolean) // optionalisPrototype.id(io.dialob.session.engine.session.model.ItemId) // requiredid.type(String) // requiredtype.valueType(io.dialob.rule.parser.api.ValueType | null) // nullablevalueType.valueSetId(Optional<String>) // optionalvalueSetId.defaultValue(Optional<Object>) // optionaldefaultValue.view(String | null) // nullableview.props(Map<String, Object> | null) // nullableprops.className(Optional<io.dialob.session.engine.program.model.Expression>) // optionalclassName.activeExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionalactiveExpression.requiredExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionalrequiredExpression.disabledExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionaldisabledExpression.labelExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionallabelExpression.descriptionExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionaldescriptionExpression.addErrors|addAllErrors(io.dialob.session.engine.program.model.Error) //errorselements .build();- Returns:
- A new ImmutableFormItem builder
-