Class ImmutableExpressionList

java.lang.Object
io.dialob.session.engine.program.expr.ImmutableExpressionList
All Implemented Interfaces:
ExpressionList, Expression, Serializable

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

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

See Also:
  • Method Details

    • getExpressions

      public com.google.common.collect.ImmutableList<Expression> getExpressions()
      Specified by:
      getExpressions in interface ExpressionList
      Returns:
      The value of the expressions attribute
    • withExpressions

      public final ImmutableExpressionList withExpressions(Expression... elements)
      Copy the current immutable object with elements that replace the content of expressions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExpressions

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

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

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

      public static ImmutableExpressionList.Builder builder()
      Creates a builder for ImmutableExpressionList.
       ImmutableExpressionList.builder()
          .addExpressions|addAllExpressions(io.dialob.session.engine.program.model.Expression) // expressions elements
          .build();
       
      Returns:
      A new ImmutableExpressionList builder