Package io.dialob.program.model
Class ImmutableVariableItem
- java.lang.Object
-
- io.dialob.program.model.ImmutableVariableItem
-
- All Implemented Interfaces:
Item,ProgramNode,StructuralNode,VariableItem,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableVariableItem extends Object implements VariableItem
Immutable implementation ofVariableItem.Use the builder to create immutable instances:
ImmutableVariableItem.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableVariableItem.BuilderBuilds instances of typeImmutableVariableItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableVariableItem.Builderbuilder()Creates a builder forImmutableVariableItem.static ImmutableVariableItemcopyOf(VariableItem instance)Creates an immutable copy of aVariableItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableVariableItemthat have equal attribute values.Optional<Object>getDefaultValue()ItemIdgetId()StringgetType()ExpressiongetValueExpression()Optional<String>getValueSetId()inthashCode()Computes a hash code from attributes:isPrototype,id,type,valueSetId,defaultValue,valueExpression,isAsync,isPublished.booleanisAsync()booleanisPrototype()booleanisPublished()StringtoString()Prints the immutable valueVariableItemwith attribute values.ImmutableVariableItemwithDefaultValue(Object value)Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.ImmutableVariableItemwithDefaultValue(Optional<? extends Object> optional)Copy the current immutable object by setting an optional value for thedefaultValueattribute.ImmutableVariableItemwithId(ItemId value)Copy the current immutable object by setting a value for theidattribute.ImmutableVariableItemwithIsAsync(boolean value)Copy the current immutable object by setting a value for theisAsyncattribute.ImmutableVariableItemwithIsPrototype(boolean value)Copy the current immutable object by setting a value for theisPrototypeattribute.ImmutableVariableItemwithIsPublished(boolean value)Copy the current immutable object by setting a value for theisPublishedattribute.ImmutableVariableItemwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableVariableItemwithValueExpression(Expression value)Copy the current immutable object by setting a value for thevalueExpressionattribute.ImmutableVariableItemwithValueSetId(String value)Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.ImmutableVariableItemwithValueSetId(Optional<String> optional)Copy the current immutable object by setting an optional value for thevalueSetIdattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.model.VariableItem
getValueType
-
-
-
-
Method Detail
-
isPrototype
public boolean isPrototype()
- Specified by:
isPrototypein interfaceStructuralNode- Returns:
- The value of the
isPrototypeattribute
-
getId
public ItemId getId()
-
getType
public String getType()
-
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
-
getValueExpression
public Expression getValueExpression()
- Specified by:
getValueExpressionin interfaceVariableItem- Returns:
- The value of the
valueExpressionattribute
-
isAsync
public boolean isAsync()
- Specified by:
isAsyncin interfaceVariableItem- Returns:
- The value of the
isAsyncattribute
-
isPublished
public boolean isPublished()
- Specified by:
isPublishedin interfaceVariableItem- Returns:
- The value of the
isPublishedattribute
-
withIsPrototype
public final ImmutableVariableItem 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 ImmutableVariableItem 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 ImmutableVariableItem 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
-
withValueSetId
public final ImmutableVariableItem 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 ImmutableVariableItem 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 ImmutableVariableItem 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 ImmutableVariableItem 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
-
withValueExpression
public final ImmutableVariableItem withValueExpression(Expression value)
Copy the current immutable object by setting a value for thevalueExpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueExpression- Returns:
- A modified copy of the
thisobject
-
withIsAsync
public final ImmutableVariableItem withIsAsync(boolean value)
Copy the current immutable object by setting a value for theisAsyncattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isAsync- Returns:
- A modified copy of the
thisobject
-
withIsPublished
public final ImmutableVariableItem withIsPublished(boolean value)
Copy the current immutable object by setting a value for theisPublishedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isPublished- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableVariableItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:isPrototype,id,type,valueSetId,defaultValue,valueExpression,isAsync,isPublished.
-
toString
public String toString()
Prints the immutable valueVariableItemwith attribute values.
-
copyOf
public static ImmutableVariableItem copyOf(VariableItem instance)
Creates an immutable copy of aVariableItemvalue. 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 VariableItem instance
-
builder
public static ImmutableVariableItem.Builder builder()
Creates a builder forImmutableVariableItem.ImmutableVariableItem.builder() .isPrototype(boolean) // optionalisPrototype.id(io.dialob.executor.model.ItemId) // requiredid.type(String) // requiredtype.valueSetId(String) // optionalvalueSetId.defaultValue(Object) // optionaldefaultValue.valueExpression(io.dialob.program.model.Expression) // requiredvalueExpression.isAsync(boolean) // optionalisAsync.isPublished(boolean) // optionalisPublished.build();- Returns:
- A new ImmutableVariableItem builder
-
-