Class ImmutableVariableItem
java.lang.Object
io.dialob.session.engine.program.model.ImmutableVariableItem
- All Implemented Interfaces:
Item,ProgramNode,StructuralNode,VariableItem,Serializable
@Generated(from="VariableItem",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableVariableItem
extends Object
implements VariableItem
Immutable implementation of
VariableItem.
Use the builder to create immutable instances:
ImmutableVariableItem.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableVariableItem. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableVariableItem.static ImmutableVariableItemcopyOf(VariableItem instance) Creates an immutable copy of aVariableItemvalue.booleanThis instance is equal to all instances ofImmutableVariableItemthat have equal attribute values.getId()getType()inthashCode()Computes a hash code from attributes:isPrototype,id,type,valueSetId,defaultValue,valueExpression,isAsync,isPublished.booleanisAsync()booleanbooleantoString()Prints the immutable valueVariableItemwith attribute values.final ImmutableVariableItemwithDefaultValue(Object value) Copy the current immutable object by setting a present value for the optionaldefaultValueattribute.final ImmutableVariableItemwithDefaultValue(Optional<? extends Object> optional) Copy the current immutable object by setting an optional value for thedefaultValueattribute.final ImmutableVariableItemCopy the current immutable object by setting a value for theidattribute.final ImmutableVariableItemwithIsAsync(boolean value) Copy the current immutable object by setting a value for theisAsyncattribute.final ImmutableVariableItemwithIsPrototype(boolean value) Copy the current immutable object by setting a value for theisPrototypeattribute.final ImmutableVariableItemwithIsPublished(boolean value) Copy the current immutable object by setting a value for theisPublishedattribute.final ImmutableVariableItemCopy the current immutable object by setting a value for thetypeattribute.final ImmutableVariableItemwithValueExpression(Expression value) Copy the current immutable object by setting a value for thevalueExpressionattribute.final ImmutableVariableItemwithValueSetId(String value) Copy the current immutable object by setting a present value for the optionalvalueSetIdattribute.final 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, waitMethods inherited from interface io.dialob.session.engine.program.model.VariableItem
getValueType
-
Method Details
-
isPrototype
public boolean isPrototype()- Specified by:
isPrototypein interfaceStructuralNode- Returns:
- The value of the
isPrototypeattribute
-
getId
-
getType
-
getValueSetId
- Specified by:
getValueSetIdin interfaceItem- Returns:
- The value of the
valueSetIdattribute
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceItem- Returns:
- The value of the
defaultValueattribute
-
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
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
-
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
-
withValueExpression
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 or the
thisobject
-
withIsAsync
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 or the
thisobject
-
withIsPublished
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 or the
thisobject
-
equals
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
Prints the immutable valueVariableItemwith attribute values. -
copyOf
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
Creates a builder forImmutableVariableItem.ImmutableVariableItem.builder() .isPrototype(boolean) // optionalisPrototype.id(io.dialob.session.engine.session.model.ItemId) // requiredid.type(String) // requiredtype.valueSetId(Optional<String>) // optionalvalueSetId.defaultValue(Optional<Object>) // optionaldefaultValue.valueExpression(io.dialob.session.engine.program.model.Expression) // requiredvalueExpression.isAsync(boolean) // optionalisAsync.isPublished(boolean) // optionalisPublished.build();- Returns:
- A new ImmutableVariableItem builder
-