Class ImmutableExpression.SetPredicate

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

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

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

  • Method Details

    • predicateOp

      public Expression.PredicateOp predicateOp()
      Specified by:
      predicateOp in class Expression.SetPredicate
      Returns:
      The value of the predicateOp attribute
    • tuples

      public Rel tuples()
      Specified by:
      tuples in class Expression.SetPredicate
      Returns:
      The value of the tuples attribute
    • withPredicateOp

      public final ImmutableExpression.SetPredicate withPredicateOp(Expression.PredicateOp value)
      Copy the current immutable object by setting a value for the predicateOp attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for predicateOp
      Returns:
      A modified copy or the this object
    • withTuples

      public final ImmutableExpression.SetPredicate withTuples(Rel value)
      Copy the current immutable object by setting a value for the tuples attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for tuples
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      Creates a builder for SetPredicate.
       ImmutableExpression.SetPredicate.builder()
          .predicateOp(io.substrait.expression.Expression.PredicateOp) // required predicateOp
          .tuples(io.substrait.relation.Rel) // required tuples
          .build();
       
      Returns:
      A new SetPredicate builder