Class ImmutableErrorLabelUpdateCommand

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

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

Use the builder to create immutable instances: ImmutableErrorLabelUpdateCommand.builder(). Use the static factory method to create immutable instances: ImmutableErrorLabelUpdateCommand.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 ImmutableErrorLabelUpdateCommand 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 ImmutableErrorLabelUpdateCommand 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 ImmutableErrorLabelUpdateCommand 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 ImmutableErrorLabelUpdateCommand 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 ImmutableErrorLabelUpdateCommand 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 ErrorLabelUpdateCommand with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableErrorLabelUpdateCommand of(ErrorId targetId, Expression expression, List<Trigger<ErrorState>> triggers)
      Construct a new immutable ErrorLabelUpdateCommand 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 ErrorLabelUpdateCommand instance
    • of

      public static ImmutableErrorLabelUpdateCommand of(ErrorId targetId, Expression expression, Iterable<? extends Trigger<ErrorState>> triggers)
      Construct a new immutable ErrorLabelUpdateCommand 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 ErrorLabelUpdateCommand instance
    • copyOf

      Creates an immutable copy of a ErrorLabelUpdateCommand 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 ErrorLabelUpdateCommand instance
    • builder

      Creates a builder for ImmutableErrorLabelUpdateCommand.
       ImmutableErrorLabelUpdateCommand.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 ImmutableErrorLabelUpdateCommand builder