Class ImmutableProcessInstanceModificationVariableInstructionValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceModificationVariableInstructionValue
- All Implemented Interfaces:
ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableProcessInstanceModificationVariableInstructionValue
extends Object
implements ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue
Immutable implementation of
ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceModificationVariableInstructionValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceModificationVariableInstructionValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceModificationVariableInstructionValue.copyOf(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceModificationVariableInstructionValuethat have equal attribute values.Returns the element id of the scope where the variables should be created in, or an empty string if the variables are global for the process instance.Returns the variables of this instruction.inthashCode()Returns a lazily computed hash code from attributes:variables,elementId.toString()Prints the immutable valueProcessInstanceModificationVariableInstructionValuewith attribute values.withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute.withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map.
-
Method Details
-
getVariables
Returns the variables of this instruction. Can be empty.- Specified by:
getVariablesin interfaceProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue
-
getElementId
Returns the element id of the scope where the variables should be created in, or an empty string if the variables are global for the process instance.- Specified by:
getElementIdin interfaceProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue
-
withVariables
public final ImmutableProcessInstanceModificationVariableInstructionValue withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap 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 variables map- Returns:
- A modified copy of
thisobject
-
withElementId
public final ImmutableProcessInstanceModificationVariableInstructionValue withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementId (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceModificationVariableInstructionValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,elementId. -
toString
Prints the immutable valueProcessInstanceModificationVariableInstructionValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceModificationVariableInstructionValue copyOf(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValuevalue. 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 ProcessInstanceModificationVariableInstructionValue instance
-
builder
Creates a builder forImmutableProcessInstanceModificationVariableInstructionValue.ImmutableProcessInstanceModificationVariableInstructionValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withElementId(String | null) // nullableelementId.build();- Returns:
- A new ImmutableProcessInstanceModificationVariableInstructionValue builder
-