Package io.dialob.executor.command
Class ImmutableSetRows
- java.lang.Object
-
- io.dialob.executor.command.ImmutableSetRows
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,Command<ItemState>,ItemUpdateCommand,SetRows,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSetRows extends Object implements SetRows
Immutable implementation ofSetRows.Use the builder to create immutable instances:
ImmutableSetRows.builder(). Use the static factory method to create immutable instances:ImmutableSetRows.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSetRows.BuilderBuilds instances of typeImmutableSetRows.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSetRows.Builderbuilder()Creates a builder forImmutableSetRows.static ImmutableSetRowscopyOf(SetRows instance)Creates an immutable copy of aSetRowsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSetRowsthat have equal attribute values.com.google.common.collect.ImmutableList<Integer>getIds()ItemIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,ids.static ImmutableSetRowsof(ItemId targetId, Iterable<Integer> ids, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableSetRowsinstance.static ImmutableSetRowsof(ItemId targetId, List<Integer> ids, List<Trigger<ItemState>> triggers)Construct a new immutableSetRowsinstance.StringtoString()Prints the immutable valueSetRowswith attribute values.ImmutableSetRowswithIds(int... elements)Copy the current immutable object with elements that replace the content ofids.ImmutableSetRowswithIds(Iterable<Integer> elements)Copy the current immutable object with elements that replace the content ofids.ImmutableSetRowswithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableSetRowswithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableSetRowswithTriggers(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
-
getIds
public com.google.common.collect.ImmutableList<Integer> getIds()
-
withTriggers
@SafeVarargs public final ImmutableSetRows 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 ImmutableSetRows 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 ImmutableSetRows 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
-
withIds
public final ImmutableSetRows withIds(int... elements)
Copy the current immutable object with elements that replace the content ofids.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIds
public final ImmutableSetRows withIds(Iterable<Integer> elements)
Copy the current immutable object with elements that replace the content ofids. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ids elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSetRowsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,ids.
-
toString
public String toString()
Prints the immutable valueSetRowswith attribute values.
-
of
public static ImmutableSetRows of(ItemId targetId, List<Integer> ids, List<Trigger<ItemState>> triggers)
Construct a new immutableSetRowsinstance.- Parameters:
targetId- The value for thetargetIdattributeids- The value for theidsattributetriggers- The value for thetriggersattribute- Returns:
- An immutable SetRows instance
-
of
public static ImmutableSetRows of(ItemId targetId, Iterable<Integer> ids, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableSetRowsinstance.- Parameters:
targetId- The value for thetargetIdattributeids- The value for theidsattributetriggers- The value for thetriggersattribute- Returns:
- An immutable SetRows instance
-
copyOf
public static ImmutableSetRows copyOf(SetRows instance)
Creates an immutable copy of aSetRowsvalue. 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 SetRows instance
-
builder
public static ImmutableSetRows.Builder builder()
Creates a builder forImmutableSetRows.ImmutableSetRows.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.addIds|addAllIds(int) //idselements .build();- Returns:
- A new ImmutableSetRows builder
-
-