Class ImmutableExpression.MultiOrList

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

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

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

  • Method Details

    • conditions

      public List<Expression> conditions()
      Specified by:
      conditions in class Expression.MultiOrList
      Returns:
      The value of the conditions attribute
    • optionCombinations

      public List<Expression.MultiOrListRecord> optionCombinations()
      Specified by:
      optionCombinations in class Expression.MultiOrList
      Returns:
      The value of the optionCombinations attribute
    • withConditions

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

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

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

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

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

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

      public static ImmutableExpression.MultiOrList.Builder builder()
      Creates a builder for MultiOrList.
       ImmutableExpression.MultiOrList.builder()
          .addConditions|addAllConditions(io.substrait.expression.Expression) // conditions elements
          .addOptionCombinations|addAllOptionCombinations(io.substrait.expression.Expression.MultiOrListRecord) // optionCombinations elements
          .build();
       
      Returns:
      A new MultiOrList builder