Class ImmutableUpdateValueSetCommand
java.lang.Object
io.dialob.session.engine.session.command.ImmutableUpdateValueSetCommand
- All Implemented Interfaces:
Command<ValueSetState>,UpdateCommand<ValueSetId,,ValueSetState> UpdateValueSetCommand,Serializable
@Generated(from="UpdateValueSetCommand",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableUpdateValueSetCommand
extends Object
implements UpdateValueSetCommand
Immutable implementation of
UpdateValueSetCommand.
Use the builder to create immutable instances:
ImmutableUpdateValueSetCommand.builder().
Use the static factory method to create immutable instances:
ImmutableUpdateValueSetCommand.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableUpdateValueSetCommand. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableUpdateValueSetCommand.copyOf(UpdateValueSetCommand instance) Creates an immutable copy of aUpdateValueSetCommandvalue.booleanThis instance is equal to all instances ofImmutableUpdateValueSetCommandthat have equal attribute values.com.google.common.collect.ImmutableList<Value<ValueSet.Entry>> com.google.common.collect.ImmutableList<Trigger<ValueSetState>> inthashCode()Computes a hash code from attributes:triggers,targetId,entries.of(ValueSetId targetId, Iterable<? extends Value<ValueSet.Entry>> entries, Iterable<? extends Trigger<ValueSetState>> triggers) Construct a new immutableUpdateValueSetCommandinstance.of(ValueSetId targetId, List<Value<ValueSet.Entry>> entries, List<Trigger<ValueSetState>> triggers) Construct a new immutableUpdateValueSetCommandinstance.toString()Prints the immutable valueUpdateValueSetCommandwith attribute values.withEntries(Value<ValueSet.Entry>... elements) Copy the current immutable object with elements that replace the content ofentries.withEntries(Iterable<? extends Value<ValueSet.Entry>> elements) Copy the current immutable object with elements that replace the content ofentries.withTargetId(ValueSetId value) Copy the current immutable object by setting a value for thetargetIdattribute.withTriggers(Trigger<ValueSetState>... elements) Copy the current immutable object with elements that replace the content oftriggers.withTriggers(Iterable<? extends Trigger<ValueSetState>> elements) Copy the current immutable object with elements that replace the content oftriggers.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.dialob.session.engine.session.command.UpdateValueSetCommand
getEventMatchers, update
-
Method Details
-
getTriggers
- Specified by:
getTriggersin interfaceCommand<ValueSetState>- Returns:
- The value of the
triggersattribute
-
getTargetId
- Specified by:
getTargetIdin interfaceUpdateCommand<ValueSetId,ValueSetState> - Returns:
- The value of the
targetIdattribute
-
getEntries
- Specified by:
getEntriesin interfaceUpdateValueSetCommand- Returns:
- The value of the
entriesattribute
-
withTriggers
@SafeVarargs public final ImmutableUpdateValueSetCommand withTriggers(Trigger<ValueSetState>... elements) Copy the current immutable object with elements that replace the content oftriggers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTriggers
public final ImmutableUpdateValueSetCommand withTriggers(Iterable<? extends Trigger<ValueSetState>> elements) Copy the current immutable object with elements that replace the content oftriggers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of triggers elements to set- Returns:
- A modified copy or
thisif not changed
-
withTargetId
Copy the current immutable object by setting a value for thetargetIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withTargetIdin interfaceUpdateCommand<ValueSetId,ValueSetState> - Parameters:
value- A new value for targetId- Returns:
- A modified copy or the
thisobject
-
withEntries
@SafeVarargs public final ImmutableUpdateValueSetCommand withEntries(Value<ValueSet.Entry>... elements) Copy the current immutable object with elements that replace the content ofentries.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEntries
public final ImmutableUpdateValueSetCommand withEntries(Iterable<? extends Value<ValueSet.Entry>> elements) Copy the current immutable object with elements that replace the content ofentries. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of entries elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableUpdateValueSetCommandthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:triggers,targetId,entries. -
toString
Prints the immutable valueUpdateValueSetCommandwith attribute values. -
of
public static ImmutableUpdateValueSetCommand of(ValueSetId targetId, List<Value<ValueSet.Entry>> entries, List<Trigger<ValueSetState>> triggers) Construct a new immutableUpdateValueSetCommandinstance.- Parameters:
targetId- The value for thetargetIdattributeentries- The value for theentriesattributetriggers- The value for thetriggersattribute- Returns:
- An immutable UpdateValueSetCommand instance
-
of
public static ImmutableUpdateValueSetCommand of(ValueSetId targetId, Iterable<? extends Value<ValueSet.Entry>> entries, Iterable<? extends Trigger<ValueSetState>> triggers) Construct a new immutableUpdateValueSetCommandinstance.- Parameters:
targetId- The value for thetargetIdattributeentries- The value for theentriesattributetriggers- The value for thetriggersattribute- Returns:
- An immutable UpdateValueSetCommand instance
-
copyOf
Creates an immutable copy of aUpdateValueSetCommandvalue. 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 UpdateValueSetCommand instance
-
builder
Creates a builder forImmutableUpdateValueSetCommand.ImmutableUpdateValueSetCommand.builder() .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ValueSetState>) //triggerselements .targetId(io.dialob.session.engine.session.model.ValueSetId) // requiredtargetId.addEntries|addAllEntries(io.dialob.session.engine.program.model.Value<io.dialob.session.engine.program.model.ValueSet.Entry>) //entrieselements .build();- Returns:
- A new ImmutableUpdateValueSetCommand builder
-