Class ImmutableExpression.NestedList

java.lang.Object
io.substrait.expression.Expression.NestedList
io.substrait.expression.ImmutableExpression.NestedList
All Implemented Interfaces:
Expression, Expression.Nested, FunctionArg
Enclosing class:
ImmutableExpression

public static final class ImmutableExpression.NestedList extends Expression.NestedList
Immutable implementation of Expression.NestedList.

Use the builder to create immutable instances: ImmutableExpression.NestedList.builder().

  • Method Details

    • nullable

      public boolean nullable()
      Returns:
      The value of the nullable attribute
    • values

      public List<Expression> values()
      Specified by:
      values in class Expression.NestedList
      Returns:
      The value of the values attribute
    • withNullable

      public final ImmutableExpression.NestedList withNullable(boolean value)
      Copy the current immutable object by setting a value for the nullable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nullable
      Returns:
      A modified copy or the this object
    • withValues

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

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

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

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

      public static ImmutableExpression.NestedList copyOf(Expression.NestedList instance)
      Creates an immutable copy of a Expression.NestedList 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 NestedList instance
    • builder

      public static ImmutableExpression.NestedList.Builder builder()
      Creates a builder for NestedList.
       ImmutableExpression.NestedList.builder()
          .nullable(boolean) // optional nullable
          .addValues|addAllValues(io.substrait.expression.Expression) // values elements
          .build();
       
      Returns:
      A new NestedList builder