Class ImmutableConditionalListOperator<T>

java.lang.Object
io.dialob.session.engine.program.expr.arith.ImmutableConditionalListOperator<T>
All Implemented Interfaces:
ConditionalListOperator<T>, Expression, Serializable

@Generated(from="ConditionalListOperator", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableConditionalListOperator<T> extends Object implements ConditionalListOperator<T>
Immutable implementation of ConditionalListOperator.

Use the builder to create immutable instances: ImmutableConditionalListOperator.builder().

See Also:
  • Method Details

    • getItems

      public com.google.common.collect.ImmutableList<Pair<Expression,T>> getItems()
      Specified by:
      getItems in interface ConditionalListOperator<T>
      Returns:
      The value of the items attribute
    • withItems

      @SafeVarargs public final ImmutableConditionalListOperator<T> withItems(Pair<Expression,T>... elements)
      Copy the current immutable object with elements that replace the content of items.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withItems

      public final ImmutableConditionalListOperator<T> withItems(Iterable<? extends Pair<Expression,T>> elements)
      Copy the current immutable object with elements that replace the content of items. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of items 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 ImmutableConditionalListOperator 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: items.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static <T> ImmutableConditionalListOperator<T> copyOf(ConditionalListOperator<T> instance)
      Creates an immutable copy of a ConditionalListOperator value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Type Parameters:
      T - generic parameter T
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ConditionalListOperator instance
    • builder

      public static <T> ImmutableConditionalListOperator.Builder<T> builder()
      Creates a builder for ImmutableConditionalListOperator.
       ImmutableConditionalListOperator.<T>builder()
          .addItems|addAllItems(io.dialob.session.engine.program.expr.arith.Pair<io.dialob.session.engine.program.model.Expression, T>) // items elements
          .build();
       
      Type Parameters:
      T - generic parameter T
      Returns:
      A new ImmutableConditionalListOperator builder