Package io.dialob.program.model
Class ImmutableGroup
- java.lang.Object
-
- io.dialob.program.model.ImmutableGroup
-
- All Implemented Interfaces:
DisplayItem,Group,Item,ProgramNode,StructuralNode,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGroup extends Object implements Group
Immutable implementation ofGroup.Use the builder to create immutable instances:
ImmutableGroup.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGroup.BuilderBuilds instances of typeImmutableGroup.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableGroup.Builderbuilder()Creates a builder forImmutableGroup.static ImmutableGroupcopyOf(Group instance)Creates an immutable copy of aGroupvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGroupthat have equal attribute values.Optional<Expression>getActiveExpression()Optional<Expression>getAllowedActionsExpression()Optional<Expression>getAvailableItemsExpression()Optional<Expression>getClassName()Optional<Object>getDefaultValue()Optional<Expression>getDescriptionExpression()Optional<Expression>getDisabledExpression()List<Error>getErrors()ItemIdgetId()Optional<Expression>getIsInvalidAnswersExpression()ExpressiongetItemsExpression()Optional<Expression>getLabelExpression()@Nullable Map<String,Object>getProps()Optional<Expression>getRequiredExpression()StringgetType()Optional<String>getValueSetId()ValueTypegetValueType()@Nullable StringgetView()inthashCode()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.booleanisPrototype()StringtoString()Prints the immutable valueGroupwith attribute values.ImmutableGroupwithActiveExpression(Expression value)Copy the current immutable object by setting a present value for the optionalactiveExpressionattribute.ImmutableGroupwithActiveExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for theactiveExpressionattribute.ImmutableGroupwithAllowedActionsExpression(Expression value)Copy the current immutable object by setting a present value for the optionalallowedActionsExpressionattribute.ImmutableGroupwithAllowedActionsExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for theallowedActionsExpressionattribute.ImmutableGroupwithAvailableItemsExpression(Expression value)Copy the current immutable object by setting a present value for the optionalavailableItemsExpressionattribute.ImmutableGroupwithAvailableItemsExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for theavailableItemsExpressionattribute.ImmutableGroupwithClassName(Expression value)Copy the current immutable object by setting a present value for the optionalclassNameattribute.ImmutableGroupwithClassName(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for theclassNameattribute.ImmutableGroupwithDefaultValue(Object value)Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.ImmutableGroupwithDefaultValue(Optional<? extends Object> optional)Copy the current immutable object by setting an optional value for thedefaultValueattribute.ImmutableGroupwithDescriptionExpression(Expression value)Copy the current immutable object by setting a present value for the optionaldescriptionExpressionattribute.ImmutableGroupwithDescriptionExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for thedescriptionExpressionattribute.ImmutableGroupwithDisabledExpression(Expression value)Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.ImmutableGroupwithDisabledExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for thedisabledExpressionattribute.ImmutableGroupwithErrors(Error... elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableGroupwithErrors(Iterable<? extends Error> elements)Copy the current immutable object with elements that replace the content oferrors.ImmutableGroupwithId(ItemId value)Copy the current immutable object by setting a value for theidattribute.ImmutableGroupwithIsInvalidAnswersExpression(Expression value)Copy the current immutable object by setting a present value for the optionalisInvalidAnswersExpressionattribute.ImmutableGroupwithIsInvalidAnswersExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for theisInvalidAnswersExpressionattribute.ImmutableGroupwithIsPrototype(boolean value)Copy the current immutable object by setting a value for theisPrototypeattribute.ImmutableGroupwithItemsExpression(Expression value)Copy the current immutable object by setting a value for theitemsExpressionattribute.ImmutableGroupwithLabelExpression(Expression value)Copy the current immutable object by setting a present value for the optionallabelExpressionattribute.ImmutableGroupwithLabelExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for thelabelExpressionattribute.ImmutableGroupwithProps(@Nullable Map<String,? extends Object> entries)Copy the current immutable object by replacing thepropsmap with the specified map.ImmutableGroupwithRequiredExpression(Expression value)Copy the current immutable object by setting a present value for the optionalrequiredExpressionattribute.ImmutableGroupwithRequiredExpression(Optional<? extends Expression> optional)Copy the current immutable object by setting an optional value for therequiredExpressionattribute.ImmutableGroupwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableGroupwithValueSetId(String value)Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.ImmutableGroupwithValueSetId(Optional<String> optional)Copy the current immutable object by setting an optional value for thevalueSetIdattribute.ImmutableGroupwithValueType(ValueType value)Copy the current immutable object by setting a value for thevalueTypeattribute.ImmutableGroupwithView(@Nullable String value)Copy the current immutable object by setting a value for theviewattribute.
-
-
-
Method Detail
-
isPrototype
public boolean isPrototype()
- Specified by:
isPrototypein interfaceStructuralNode- Returns:
- The value of the
isPrototypeattribute
-
getId
public ItemId getId()
-
getType
public String getType()
-
getValueType
@Nullable public ValueType getValueType()
- Specified by:
getValueTypein interfaceItem- Returns:
- The value of the
valueTypeattribute
-
getValueSetId
public Optional<String> getValueSetId()
- Specified by:
getValueSetIdin interfaceItem- Returns:
- The value of the
valueSetIdattribute
-
getDefaultValue
public Optional<Object> getDefaultValue()
- Specified by:
getDefaultValuein interfaceItem- Returns:
- The value of the
defaultValueattribute
-
getView
@Nullable public @Nullable String getView()
- Specified by:
getViewin interfaceDisplayItem- Returns:
- The value of the
viewattribute
-
getProps
@Nullable public @Nullable Map<String,Object> getProps()
- Specified by:
getPropsin interfaceDisplayItem- Returns:
- The value of the
propsattribute
-
getClassName
public Optional<Expression> getClassName()
- Specified by:
getClassNamein interfaceDisplayItem- Returns:
- The value of the
classNameattribute
-
getActiveExpression
public Optional<Expression> getActiveExpression()
- Specified by:
getActiveExpressionin interfaceDisplayItem- Returns:
- The value of the
activeExpressionattribute
-
getRequiredExpression
public Optional<Expression> getRequiredExpression()
- Specified by:
getRequiredExpressionin interfaceDisplayItem- Returns:
- The value of the
requiredExpressionattribute
-
getDisabledExpression
public Optional<Expression> getDisabledExpression()
- Specified by:
getDisabledExpressionin interfaceDisplayItem- Returns:
- The value of the
disabledExpressionattribute
-
getLabelExpression
public Optional<Expression> getLabelExpression()
- Specified by:
getLabelExpressionin interfaceDisplayItem- Returns:
- The value of the
labelExpressionattribute
-
getDescriptionExpression
public Optional<Expression> getDescriptionExpression()
- Specified by:
getDescriptionExpressionin interfaceDisplayItem- Returns:
- The value of the
descriptionExpressionattribute
-
getErrors
public List<Error> getErrors()
- Specified by:
getErrorsin interfaceDisplayItem- Returns:
- The value of the
errorsattribute
-
getItemsExpression
public Expression getItemsExpression()
- Specified by:
getItemsExpressionin interfaceGroup- Returns:
- The value of the
itemsExpressionattribute
-
getAvailableItemsExpression
public Optional<Expression> getAvailableItemsExpression()
- Specified by:
getAvailableItemsExpressionin interfaceGroup- Returns:
- The value of the
availableItemsExpressionattribute
-
getIsInvalidAnswersExpression
public Optional<Expression> getIsInvalidAnswersExpression()
- Specified by:
getIsInvalidAnswersExpressionin interfaceGroup- Returns:
- The value of the
isInvalidAnswersExpressionattribute
-
getAllowedActionsExpression
public Optional<Expression> getAllowedActionsExpression()
- Specified by:
getAllowedActionsExpressionin interfaceGroup- Returns:
- The value of the
allowedActionsExpressionattribute
-
withIsPrototype
public final ImmutableGroup withIsPrototype(boolean value)
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 of the
thisobject
-
withId
public final ImmutableGroup withId(ItemId value)
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 of the
thisobject
-
withType
public final ImmutableGroup withType(String value)
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 of the
thisobject
-
withValueType
public final ImmutableGroup withValueType(@Nullable ValueType value)
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 of the
thisobject
-
withValueSetId
public final ImmutableGroup withValueSetId(String value)
Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.- Parameters:
value- The value for valueSetId- Returns:
- A modified copy of
thisobject
-
withValueSetId
public final ImmutableGroup withValueSetId(Optional<String> optional)
Copy the current immutable object by setting an optional value for thevalueSetIdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for valueSetId- Returns:
- A modified copy of
thisobject
-
withDefaultValue
public final ImmutableGroup withDefaultValue(Object value)
Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.- Parameters:
value- The value for defaultValue- Returns:
- A modified copy of
thisobject
-
withDefaultValue
public final ImmutableGroup withDefaultValue(Optional<? extends Object> optional)
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- A value for defaultValue- Returns:
- A modified copy of
thisobject
-
withView
public final ImmutableGroup withView(@Nullable @Nullable String value)
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 of the
thisobject
-
withProps
public final ImmutableGroup withProps(@Nullable @Nullable Map<String,? extends Object> entries)
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 be added to the props map- Returns:
- A modified copy of
thisobject
-
withClassName
public final ImmutableGroup withClassName(Expression value)
Copy the current immutable object by setting a present value for the optionalclassNameattribute.- Parameters:
value- The value for className- Returns:
- A modified copy of
thisobject
-
withClassName
public final ImmutableGroup withClassName(Optional<? extends Expression> optional)
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- A value for className- Returns:
- A modified copy of
thisobject
-
withActiveExpression
public final ImmutableGroup withActiveExpression(Expression value)
Copy the current immutable object by setting a present value for the optionalactiveExpressionattribute.- Parameters:
value- The value for activeExpression- Returns:
- A modified copy of
thisobject
-
withActiveExpression
public final ImmutableGroup withActiveExpression(Optional<? extends Expression> optional)
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- A value for activeExpression- Returns:
- A modified copy of
thisobject
-
withRequiredExpression
public final ImmutableGroup withRequiredExpression(Expression value)
Copy the current immutable object by setting a present value for the optionalrequiredExpressionattribute.- Parameters:
value- The value for requiredExpression- Returns:
- A modified copy of
thisobject
-
withRequiredExpression
public final ImmutableGroup withRequiredExpression(Optional<? extends Expression> optional)
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- A value for requiredExpression- Returns:
- A modified copy of
thisobject
-
withDisabledExpression
public final ImmutableGroup withDisabledExpression(Expression value)
Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.- Parameters:
value- The value for disabledExpression- Returns:
- A modified copy of
thisobject
-
withDisabledExpression
public final ImmutableGroup withDisabledExpression(Optional<? extends Expression> optional)
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- A value for disabledExpression- Returns:
- A modified copy of
thisobject
-
withLabelExpression
public final ImmutableGroup withLabelExpression(Expression value)
Copy the current immutable object by setting a present value for the optionallabelExpressionattribute.- Parameters:
value- The value for labelExpression- Returns:
- A modified copy of
thisobject
-
withLabelExpression
public final ImmutableGroup withLabelExpression(Optional<? extends Expression> optional)
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- A value for labelExpression- Returns:
- A modified copy of
thisobject
-
withDescriptionExpression
public final ImmutableGroup withDescriptionExpression(Expression value)
Copy the current immutable object by setting a present value for the optionaldescriptionExpressionattribute.- Parameters:
value- The value for descriptionExpression- Returns:
- A modified copy of
thisobject
-
withDescriptionExpression
public final ImmutableGroup withDescriptionExpression(Optional<? extends Expression> optional)
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- A value for descriptionExpression- Returns:
- A modified copy of
thisobject
-
withErrors
public final ImmutableGroup withErrors(Error... elements)
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
public final ImmutableGroup withErrors(Iterable<? extends Error> elements)
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 of
thisobject
-
withItemsExpression
public final ImmutableGroup withItemsExpression(Expression value)
Copy the current immutable object by setting a value for theitemsExpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for itemsExpression- Returns:
- A modified copy of the
thisobject
-
withAvailableItemsExpression
public final ImmutableGroup withAvailableItemsExpression(Expression value)
Copy the current immutable object by setting a present value for the optionalavailableItemsExpressionattribute.- Parameters:
value- The value for availableItemsExpression- Returns:
- A modified copy of
thisobject
-
withAvailableItemsExpression
public final ImmutableGroup withAvailableItemsExpression(Optional<? extends Expression> optional)
Copy the current immutable object by setting an optional value for theavailableItemsExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for availableItemsExpression- Returns:
- A modified copy of
thisobject
-
withIsInvalidAnswersExpression
public final ImmutableGroup withIsInvalidAnswersExpression(Expression value)
Copy the current immutable object by setting a present value for the optionalisInvalidAnswersExpressionattribute.- Parameters:
value- The value for isInvalidAnswersExpression- Returns:
- A modified copy of
thisobject
-
withIsInvalidAnswersExpression
public final ImmutableGroup withIsInvalidAnswersExpression(Optional<? extends Expression> optional)
Copy the current immutable object by setting an optional value for theisInvalidAnswersExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for isInvalidAnswersExpression- Returns:
- A modified copy of
thisobject
-
withAllowedActionsExpression
public final ImmutableGroup withAllowedActionsExpression(Expression value)
Copy the current immutable object by setting a present value for the optionalallowedActionsExpressionattribute.- Parameters:
value- The value for allowedActionsExpression- Returns:
- A modified copy of
thisobject
-
withAllowedActionsExpression
public final ImmutableGroup withAllowedActionsExpression(Optional<? extends Expression> optional)
Copy the current immutable object by setting an optional value for theallowedActionsExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for allowedActionsExpression- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableGroupthat 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,itemsExpression,availableItemsExpression,isInvalidAnswersExpression,allowedActionsExpression.
-
toString
public String toString()
Prints the immutable valueGroupwith attribute values.
-
copyOf
public static ImmutableGroup copyOf(Group instance)
Creates an immutable copy of aGroupvalue. 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 forImmutableGroup.ImmutableGroup.builder() .isPrototype(boolean) // optionalisPrototype.id(io.dialob.executor.model.ItemId) // requiredid.type(String) // requiredtype.valueType(io.dialob.rule.parser.api.ValueType | null) // nullablevalueType.valueSetId(String) // optionalvalueSetId.defaultValue(Object) // optionaldefaultValue.view(String | null) // nullableview.props(Map<String, Object> | null) // nullableprops.className(io.dialob.program.model.Expression) // optionalclassName.activeExpression(io.dialob.program.model.Expression) // optionalactiveExpression.requiredExpression(io.dialob.program.model.Expression) // optionalrequiredExpression.disabledExpression(io.dialob.program.model.Expression) // optionaldisabledExpression.labelExpression(io.dialob.program.model.Expression) // optionallabelExpression.descriptionExpression(io.dialob.program.model.Expression) // optionaldescriptionExpression.addErrors|addAllErrors(io.dialob.program.model.Error) //errorselements .itemsExpression(io.dialob.program.model.Expression) // requireditemsExpression.availableItemsExpression(io.dialob.program.model.Expression) // optionalavailableItemsExpression.isInvalidAnswersExpression(io.dialob.program.model.Expression) // optionalisInvalidAnswersExpression.allowedActionsExpression(io.dialob.program.model.Expression) // optionalallowedActionsExpression.build();- Returns:
- A new ImmutableGroup builder
-
-