Package io.dialob.executor.command
Class ImmutableUpdateValueSetCommand
- java.lang.Object
-
- io.dialob.executor.command.ImmutableUpdateValueSetCommand
-
- All Implemented Interfaces:
Command<ValueSetState>,UpdateCommand<ValueSetId,ValueSetState>,UpdateValueSetCommand,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUpdateValueSetCommand extends Object implements UpdateValueSetCommand
Immutable implementation ofUpdateValueSetCommand.Use the builder to create immutable instances:
ImmutableUpdateValueSetCommand.builder(). Use the static factory method to create immutable instances:ImmutableUpdateValueSetCommand.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUpdateValueSetCommand.BuilderBuilds instances of typeImmutableUpdateValueSetCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableUpdateValueSetCommand.Builderbuilder()Creates a builder forImmutableUpdateValueSetCommand.static ImmutableUpdateValueSetCommandcopyOf(UpdateValueSetCommand instance)Creates an immutable copy of aUpdateValueSetCommandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableUpdateValueSetCommandthat have equal attribute values.com.google.common.collect.ImmutableList<Value<ValueSet.Entry>>getEntries()ValueSetIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ValueSetState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,entries.static ImmutableUpdateValueSetCommandof(ValueSetId targetId, Iterable<? extends Value<ValueSet.Entry>> entries, Iterable<? extends Trigger<ValueSetState>> triggers)Construct a new immutableUpdateValueSetCommandinstance.static ImmutableUpdateValueSetCommandof(ValueSetId targetId, List<Value<ValueSet.Entry>> entries, List<Trigger<ValueSetState>> triggers)Construct a new immutableUpdateValueSetCommandinstance.StringtoString()Prints the immutable valueUpdateValueSetCommandwith attribute values.ImmutableUpdateValueSetCommandwithEntries(Value<ValueSet.Entry>... elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableUpdateValueSetCommandwithEntries(Iterable<? extends Value<ValueSet.Entry>> elements)Copy the current immutable object with elements that replace the content ofentries.ImmutableUpdateValueSetCommandwithTargetId(ValueSetId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableUpdateValueSetCommandwithTriggers(Trigger<ValueSetState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableUpdateValueSetCommandwithTriggers(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, wait
-
Methods inherited from interface io.dialob.executor.command.UpdateValueSetCommand
getEventMatchers, update
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ValueSetState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ValueSetState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ValueSetId getTargetId()
- Specified by:
getTargetIdin interfaceUpdateCommand<ValueSetId,ValueSetState>- Returns:
- The value of the
targetIdattribute
-
getEntries
public com.google.common.collect.ImmutableList<Value<ValueSet.Entry>> 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 of
thisobject
-
withTargetId
public final ImmutableUpdateValueSetCommand withTargetId(ValueSetId value)
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 of 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 of
thisobject
-
equals
public boolean equals(@Nullable Object another)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
public String 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
public static ImmutableUpdateValueSetCommand copyOf(UpdateValueSetCommand instance)
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
public static ImmutableUpdateValueSetCommand.Builder builder()
Creates a builder forImmutableUpdateValueSetCommand.ImmutableUpdateValueSetCommand.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ValueSetState>) //triggerselements .targetId(io.dialob.executor.model.ValueSetId) // requiredtargetId.addEntries|addAllEntries(io.dialob.program.model.Value<io.dialob.program.model.ValueSet.Entry>) //entrieselements .build();- Returns:
- A new ImmutableUpdateValueSetCommand builder
-
-