Class ImmutableSetRows
java.lang.Object
io.dialob.session.engine.session.command.ImmutableSetRows
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,,ItemState> Command<ItemState>,ItemUpdateCommand,SetRows,UpdateCommand<ItemId,,ItemState> Serializable
@Generated(from="SetRows",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableSetRows
extends Object
implements SetRows
Immutable implementation of
SetRows.
Use the builder to create immutable instances:
ImmutableSetRows.builder().
Use the static factory method to create immutable instances:
ImmutableSetRows.of().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableSetRows.Builderbuilder()Creates a builder forImmutableSetRows.static ImmutableSetRowsCreates an immutable copy of aSetRowsvalue.booleanThis instance is equal to all instances ofImmutableSetRowsthat have equal attribute values.com.google.common.collect.ImmutableList<BigInteger> getIds()inthashCode()Computes a hash code from attributes:triggers,targetId,ids.static ImmutableSetRowsof(ItemId targetId, Iterable<? extends BigInteger> ids, Iterable<? extends Trigger<ItemState>> triggers) Construct a new immutableSetRowsinstance.static ImmutableSetRowsConstruct a new immutableSetRowsinstance.toString()Prints the immutable valueSetRowswith attribute values.final ImmutableSetRowswithIds(Iterable<? extends BigInteger> elements) Copy the current immutable object with elements that replace the content ofids.final ImmutableSetRowswithIds(BigInteger... elements) Copy the current immutable object with elements that replace the content ofids.final ImmutableSetRowswithTargetId(ItemId value) Copy the current immutable object by setting a value for thetargetIdattribute.final ImmutableSetRowswithTriggers(Trigger<ItemState>... elements) Copy the current immutable object with elements that replace the content oftriggers.final 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, waitMethods inherited from interface io.dialob.session.engine.session.command.Command
getEventMatchers
-
Method Details
-
getTriggers
- Specified by:
getTriggersin interfaceCommand<ItemState>- Returns:
- The value of the
triggersattribute
-
getTargetId
- Specified by:
getTargetIdin interfaceUpdateCommand<ItemId,ItemState> - Returns:
- The value of the
targetIdattribute
-
getIds
-
withTriggers
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
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<ItemId,ItemState> - Parameters:
value- A new value for targetId- Returns:
- A modified copy or the
thisobject
-
withIds
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
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 or
thisif not changed
-
equals
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
Prints the immutable valueSetRowswith attribute values. -
of
public static ImmutableSetRows of(ItemId targetId, List<BigInteger> 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<? extends BigInteger> 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
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
Creates a builder forImmutableSetRows.ImmutableSetRows.builder() .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ItemState>) //triggerselements .targetId(io.dialob.session.engine.session.model.ItemId) // requiredtargetId.addIds|addAllIds(java.math.BigInteger) //idselements .build();- Returns:
- A new ImmutableSetRows builder
-