Package io.dialob.executor.command
Class ImmutableInitGroupItems
- java.lang.Object
-
- io.dialob.executor.command.ImmutableInitGroupItems
-
- All Implemented Interfaces:
AbstractUpdateCommand<ItemId,ItemState>,Command<ItemState>,InitGroupItems,ItemInitCommand,ItemUpdateCommand,UpdateCommand<ItemId,ItemState>,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInitGroupItems extends Object implements InitGroupItems
Immutable implementation ofInitGroupItems.Use the builder to create immutable instances:
ImmutableInitGroupItems.builder(). Use the static factory method to create immutable instances:ImmutableInitGroupItems.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableInitGroupItems.BuilderBuilds instances of typeImmutableInitGroupItems.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableInitGroupItems.Builderbuilder()Creates a builder forImmutableInitGroupItems.static ImmutableInitGroupItemscopyOf(InitGroupItems instance)Creates an immutable copy of aInitGroupItemsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableInitGroupItemsthat have equal attribute values.ExpressiongetExpression()ItemIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ItemState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,expression.static ImmutableInitGroupItemsof(ItemId targetId, Expression expression, Iterable<? extends Trigger<ItemState>> triggers)Construct a new immutableInitGroupItemsinstance.static ImmutableInitGroupItemsof(ItemId targetId, Expression expression, List<Trigger<ItemState>> triggers)Construct a new immutableInitGroupItemsinstance.StringtoString()Prints the immutable valueInitGroupItemswith attribute values.ImmutableInitGroupItemswithExpression(Expression value)Copy the current immutable object by setting a value for theexpressionattribute.ImmutableInitGroupItemswithTargetId(ItemId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableInitGroupItemswithTriggers(Trigger<ItemState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableInitGroupItemswithTriggers(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.InitGroupItems
getEventMatchers, update
-
-
-
-
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
-
getExpression
public Expression getExpression()
- Specified by:
getExpressionin interfaceInitGroupItems- Returns:
- The value of the
expressionattribute
-
withTriggers
@SafeVarargs public final ImmutableInitGroupItems 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 ImmutableInitGroupItems 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 ImmutableInitGroupItems 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
-
withExpression
public final ImmutableInitGroupItems withExpression(Expression value)
Copy the current immutable object by setting a value for theexpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expression- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableInitGroupItemsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,expression.
-
toString
public String toString()
Prints the immutable valueInitGroupItemswith attribute values.
-
of
public static ImmutableInitGroupItems of(ItemId targetId, Expression expression, List<Trigger<ItemState>> triggers)
Construct a new immutableInitGroupItemsinstance.- Parameters:
targetId- The value for thetargetIdattributeexpression- The value for theexpressionattributetriggers- The value for thetriggersattribute- Returns:
- An immutable InitGroupItems instance
-
of
public static ImmutableInitGroupItems of(ItemId targetId, Expression expression, Iterable<? extends Trigger<ItemState>> triggers)
Construct a new immutableInitGroupItemsinstance.- Parameters:
targetId- The value for thetargetIdattributeexpression- The value for theexpressionattributetriggers- The value for thetriggersattribute- Returns:
- An immutable InitGroupItems instance
-
copyOf
public static ImmutableInitGroupItems copyOf(InitGroupItems instance)
Creates an immutable copy of aInitGroupItemsvalue. 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 InitGroupItems instance
-
builder
public static ImmutableInitGroupItems.Builder builder()
Creates a builder forImmutableInitGroupItems.ImmutableInitGroupItems.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ItemState>) //triggerselements .targetId(io.dialob.executor.model.ItemId) // requiredtargetId.expression(io.dialob.program.model.Expression) // requiredexpression.build();- Returns:
- A new ImmutableInitGroupItems builder
-
-