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:
  • Method Details

    • getTriggers

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

      public ItemId getTargetId()
      Specified by:
      getTargetId in interface UpdateCommand<ItemId,ItemState>
      Returns:
      The value of the targetId attribute
    • getIds

      public com.google.common.collect.ImmutableList<BigInteger> getIds()
      Specified by:
      getIds in interface SetRows
      Returns:
      The value of the ids attribute
    • withTriggers

      @SafeVarargs public final ImmutableSetRows withTriggers(Trigger<ItemState>... 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 ImmutableSetRows withTriggers(Iterable<? extends Trigger<ItemState>> 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 ImmutableSetRows withTargetId(ItemId 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<ItemId,ItemState>
      Parameters:
      value - A new value for targetId
      Returns:
      A modified copy or the this object
    • withIds

      public final ImmutableSetRows withIds(BigInteger... elements)
      Copy the current immutable object with elements that replace the content of ids.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withIds

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSetRows 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, ids.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableSetRows of(ItemId targetId, List<BigInteger> ids, List<Trigger<ItemState>> triggers)
      Construct a new immutable SetRows instance.
      Parameters:
      targetId - The value for the targetId attribute
      ids - The value for the ids attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable SetRows instance
    • of

      public static ImmutableSetRows of(ItemId targetId, Iterable<? extends BigInteger> ids, Iterable<? extends Trigger<ItemState>> triggers)
      Construct a new immutable SetRows instance.
      Parameters:
      targetId - The value for the targetId attribute
      ids - The value for the ids attribute
      triggers - The value for the triggers attribute
      Returns:
      An immutable SetRows instance
    • copyOf

      public static ImmutableSetRows copyOf(SetRows instance)
      Creates an immutable copy of a SetRows 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 SetRows instance
    • builder

      public static ImmutableSetRows.Builder builder()
      Creates a builder for ImmutableSetRows.
       ImmutableSetRows.builder()
          .addTriggers|addAllTriggers(io.dialob.session.engine.session.command.Trigger<io.dialob.session.engine.session.model.ItemState>) // triggers elements
          .targetId(io.dialob.session.engine.session.model.ItemId) // required targetId
          .addIds|addAllIds(java.math.BigInteger) // ids elements
          .build();
       
      Returns:
      A new ImmutableSetRows builder