Package io.dialob.executor.command
Class ImmutableUpdateValidationCommand
- java.lang.Object
-
- io.dialob.executor.command.ImmutableUpdateValidationCommand
-
- All Implemented Interfaces:
Command<ErrorState>,ErrorUpdateCommand,UpdateCommand<ErrorId,ErrorState>,UpdateValidationCommand,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUpdateValidationCommand extends Object implements UpdateValidationCommand
Immutable implementation ofUpdateValidationCommand.Use the builder to create immutable instances:
ImmutableUpdateValidationCommand.builder(). Use the static factory method to create immutable instances:ImmutableUpdateValidationCommand.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUpdateValidationCommand.BuilderBuilds instances of typeImmutableUpdateValidationCommand.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableUpdateValidationCommand.Builderbuilder()Creates a builder forImmutableUpdateValidationCommand.static ImmutableUpdateValidationCommandcopyOf(UpdateValidationCommand instance)Creates an immutable copy of aUpdateValidationCommandvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableUpdateValidationCommandthat have equal attribute values.ExpressiongetExpression()ErrorIdgetTargetId()com.google.common.collect.ImmutableList<Trigger<ErrorState>>getTriggers()inthashCode()Computes a hash code from attributes:triggers,targetId,expression.static ImmutableUpdateValidationCommandof(ErrorId targetId, Expression expression, Iterable<? extends Trigger<ErrorState>> triggers)Construct a new immutableUpdateValidationCommandinstance.static ImmutableUpdateValidationCommandof(ErrorId targetId, Expression expression, List<Trigger<ErrorState>> triggers)Construct a new immutableUpdateValidationCommandinstance.StringtoString()Prints the immutable valueUpdateValidationCommandwith attribute values.ImmutableUpdateValidationCommandwithExpression(Expression value)Copy the current immutable object by setting a value for theexpressionattribute.ImmutableUpdateValidationCommandwithTargetId(ErrorId value)Copy the current immutable object by setting a value for thetargetIdattribute.ImmutableUpdateValidationCommandwithTriggers(Trigger<ErrorState>... elements)Copy the current immutable object with elements that replace the content oftriggers.ImmutableUpdateValidationCommandwithTriggers(Iterable<? extends Trigger<ErrorState>> 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.ErrorUpdateCommand
getEventMatchers
-
Methods inherited from interface io.dialob.executor.command.UpdateValidationCommand
update
-
-
-
-
Method Detail
-
getTriggers
public com.google.common.collect.ImmutableList<Trigger<ErrorState>> getTriggers()
- Specified by:
getTriggersin interfaceCommand<ErrorState>- Returns:
- The value of the
triggersattribute
-
getTargetId
public ErrorId getTargetId()
- Specified by:
getTargetIdin interfaceUpdateCommand<ErrorId,ErrorState>- Returns:
- The value of the
targetIdattribute
-
getExpression
public Expression getExpression()
- Specified by:
getExpressionin interfaceErrorUpdateCommand- Returns:
- The value of the
expressionattribute
-
withTriggers
@SafeVarargs public final ImmutableUpdateValidationCommand withTriggers(Trigger<ErrorState>... 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 ImmutableUpdateValidationCommand withTriggers(Iterable<? extends Trigger<ErrorState>> 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 ImmutableUpdateValidationCommand withTargetId(ErrorId 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<ErrorId,ErrorState>- Parameters:
value- A new value for targetId- Returns:
- A modified copy of the
thisobject
-
withExpression
public final ImmutableUpdateValidationCommand 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 ofImmutableUpdateValidationCommandthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:triggers,targetId,expression.
-
toString
public String toString()
Prints the immutable valueUpdateValidationCommandwith attribute values.
-
of
public static ImmutableUpdateValidationCommand of(ErrorId targetId, Expression expression, List<Trigger<ErrorState>> triggers)
Construct a new immutableUpdateValidationCommandinstance.- Parameters:
targetId- The value for thetargetIdattributeexpression- The value for theexpressionattributetriggers- The value for thetriggersattribute- Returns:
- An immutable UpdateValidationCommand instance
-
of
public static ImmutableUpdateValidationCommand of(ErrorId targetId, Expression expression, Iterable<? extends Trigger<ErrorState>> triggers)
Construct a new immutableUpdateValidationCommandinstance.- Parameters:
targetId- The value for thetargetIdattributeexpression- The value for theexpressionattributetriggers- The value for thetriggersattribute- Returns:
- An immutable UpdateValidationCommand instance
-
copyOf
public static ImmutableUpdateValidationCommand copyOf(UpdateValidationCommand instance)
Creates an immutable copy of aUpdateValidationCommandvalue. 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 UpdateValidationCommand instance
-
builder
public static ImmutableUpdateValidationCommand.Builder builder()
Creates a builder forImmutableUpdateValidationCommand.ImmutableUpdateValidationCommand.builder() .addTriggers|addAllTriggers(io.dialob.executor.command.Trigger<io.dialob.executor.model.ErrorState>) //triggerselements .targetId(io.dialob.executor.model.ErrorId) // requiredtargetId.expression(io.dialob.program.model.Expression) // requiredexpression.build();- Returns:
- A new ImmutableUpdateValidationCommand builder
-
-