Package io.substrait.expression
Class ImmutableExpression.InPredicate.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.InPredicate.Builder
- Enclosing class:
- ImmutableExpression.InPredicate
Builds instances of type
InPredicate.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllNeedles(Iterable<? extends Expression> elements) Adds elements toneedleslist.addNeedles(Expression element) Adds one element toneedleslist.addNeedles(Expression... elements) Adds elements toneedleslist.build()Builds a newInPredicate.from(Expression.InPredicate instance) Fill a builder with attribute values from the providedInPredicateinstance.Initializes the value for thehaystackattribute.needles(Iterable<? extends Expression> elements) Sets or replaces all elements forneedleslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedInPredicateinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
haystack
Initializes the value for thehaystackattribute.- Parameters:
haystack- The value for haystack- Returns:
thisbuilder for use in a chained invocation
-
addNeedles
Adds one element toneedleslist.- Parameters:
element- A needles element- Returns:
thisbuilder for use in a chained invocation
-
addNeedles
Adds elements toneedleslist.- Parameters:
elements- An array of needles elements- Returns:
thisbuilder for use in a chained invocation
-
needles
public final ImmutableExpression.InPredicate.Builder needles(Iterable<? extends Expression> elements) Sets or replaces all elements forneedleslist.- Parameters:
elements- An iterable of needles elements- Returns:
thisbuilder for use in a chained invocation
-
addAllNeedles
public final ImmutableExpression.InPredicate.Builder addAllNeedles(Iterable<? extends Expression> elements) Adds elements toneedleslist.- Parameters:
elements- An iterable of needles elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newInPredicate.- Returns:
- An immutable instance of InPredicate
- Throws:
IllegalStateException- if any required attributes are missing
-