Class ImmutableUpdateValidationCommand

java.lang.Object
io.dialob.session.engine.session.command.ImmutableUpdateValidationCommand
All Implemented Interfaces:
Command<ErrorState>, ErrorUpdateCommand, UpdateCommand<ErrorId,ErrorState>, UpdateValidationCommand, Serializable

@Generated(from="UpdateValidationCommand", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUpdateValidationCommand extends Object implements UpdateValidationCommand
Immutable implementation of UpdateValidationCommand.

Use the builder to create immutable instances: ImmutableUpdateValidationCommand.builder(). Use the static factory method to create immutable instances: ImmutableUpdateValidationCommand.of().

See Also:
  • Method Details

    • getTriggers

      public com.google.common.collect.ImmutableList<Trigger<ErrorState>> getTriggers()
      Specified by:
      getTriggers in interface Command<ErrorState>
      Returns:
      The value of the triggers attribute
    • getTargetId

      public ErrorId getTargetId()
      Specified by:
      getTargetId in interface UpdateCommand<ErrorId,ErrorState>
      Returns:
      The value of the targetId attribute
    • getExpression

      public Expression getExpression()
      Specified by:
      getExpression in interface ErrorUpdateCommand
      Returns:
      The value of the expression attribute
    • withTriggers

      @SafeVarargs public final ImmutableUpdateValidationCommand withTriggers(Trigger<ErrorState>... elements)
      Copy the current immutable object with elements that replace the content of triggers.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTriggers

      public final ImmutableUpdateValidationCommand withTriggers(Iterable<? extends Trigger<ErrorState>> elements)
      Copy the current immutable object with elements that replace the content of triggers. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of triggers elements to set
      Returns:
      A modified copy or this if not changed
    • withTargetId

      public final ImmutableUpdateValidationCommand withTargetId(ErrorId value)
      Copy the current immutable object by setting a value for the targetId attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Specified by:
      withTargetId in interface UpdateCommand<ErrorId,ErrorState>
      Parameters:
      value - A new value for targetId
      Returns:
      A modified copy or the this object
    • withExpression

      public final ImmutableUpdateValidationCommand withExpression(Expression value)
      Copy the current immutable object by setting a value for the expression attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for expression
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableUpdateValidationCommand that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: triggers, targetId, expression.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value UpdateValidationCommand with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableUpdateValidationCommand of(ErrorId targetId, Expression expression, List<Trigger<ErrorState>> triggers)
      Construct a new immutable UpdateValidationCommand instance.
      Parameters:
      targetId - The value for the targetId attribute
      expression - The value for the expression attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable UpdateValidationCommand instance
    • of

      public static ImmutableUpdateValidationCommand of(ErrorId targetId, Expression expression, Iterable<? extends Trigger<ErrorState>> triggers)
      Construct a new immutable UpdateValidationCommand instance.
      Parameters:
      targetId - The value for the targetId attribute
      expression - The value for the expression attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable UpdateValidationCommand instance
    • copyOf

      Creates an immutable copy of a UpdateValidationCommand value. 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

      Creates a builder for ImmutableUpdateValidationCommand.
       ImmutableUpdateValidationCommand.builder()
          .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ErrorState>) // triggers elements
          .targetId(io.dialob.session.engine.session.model.ErrorId) // required targetId
          .expression(io.dialob.session.engine.program.model.Expression) // required expression
          .build();
       
      Returns:
      A new ImmutableUpdateValidationCommand builder