Package io.dialob.executor.command
Class ImmutableAddRow
- java.lang.Object
-
- io.dialob.executor.command.ImmutableAddRow
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,AddRow,Command<ItemState>,ItemUpdateCommand,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAddRow extends Object implements AddRow
Immutable implementation ofAddRow.Use the builder to create immutable instances:
ImmutableAddRow.builder(). Use the static factory method to create immutable instances:ImmutableAddRow.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAddRow.BuilderBuilds instances of typeImmutableAddRow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAddRow.Builderbuilder()Creates a builder forImmutableAddRow.static ImmutableAddRowcopyOf(AddRow instance)Creates an immutable copy of aAddRowvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableAddRowthat have equal attribute values.ItemIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId.static ImmutableAddRowof(ItemId targetId, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableAddRowinstance.static ImmutableAddRowof(ItemId targetId, List<Trigger<ItemState>> triggers)Construct a new immutableAddRowinstance.StringtoString()Prints the immutable valueAddRowwith attribute values.ImmutableAddRowwithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableAddRowwithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableAddRowwithTriggers(Iterable<? extends Trigger<ItemState>> 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.Command
getEventMatchers
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ItemState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ItemId getTargetId()
- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState>- Returns:
- The value of the
targetIdattribute
-
withTriggers
@SafeVarargs public final ImmutableAddRow withTriggers(Trigger<ItemState>... 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 ImmutableAddRow withTriggers(Iterable<? extends Trigger<ItemState>> 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 ImmutableAddRow withTargetId(ItemId 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<ItemId,ItemState>- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableAddRowthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId.
-
toString
public String toString()
Prints the immutable valueAddRowwith attribute values.
-
of
public static ImmutableAddRow of(ItemId targetId, List<Trigger<ItemState>> triggers)
Construct a new immutableAddRowinstance.- Parameters:
targetId- The value for thetargetIdattributetriggers- The value for thetriggersattribute- Returns:
- An immutable AddRow instance
-
of
public static ImmutableAddRow of(ItemId targetId, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableAddRowinstance.- Parameters:
targetId- The value for thetargetIdattributetriggers- The value for thetriggersattribute- Returns:
- An immutable AddRow instance
-
copyOf
public static ImmutableAddRow copyOf(AddRow instance)
Creates an immutable copy of aAddRowvalue. 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 AddRow instance
-
builder
public static ImmutableAddRow.Builder builder()
Creates a builder forImmutableAddRow.ImmutableAddRow.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.build();- Returns:
- A new ImmutableAddRow builder
-
-