Package io.substrait.expression
Class ImmutableExpression.SingleOrList.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.SingleOrList.Builder
- Enclosing class:
- ImmutableExpression.SingleOrList
Builds instances of type
SingleOrList.
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 TypeMethodDescriptionaddAllOptions(Iterable<? extends Expression> elements) Adds elements tooptionslist.addOptions(Expression element) Adds one element tooptionslist.addOptions(Expression... elements) Adds elements tooptionslist.build()Builds a newSingleOrList.condition(Expression condition) Initializes the value for theconditionattribute.from(Expression.SingleOrList instance) Fill a builder with attribute values from the providedSingleOrListinstance.options(Iterable<? extends Expression> elements) Sets or replaces all elements foroptionslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedSingleOrListinstance. 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
-
condition
Initializes the value for theconditionattribute.- Parameters:
condition- The value for condition- Returns:
thisbuilder for use in a chained invocation
-
addOptions
Adds one element tooptionslist.- Parameters:
element- A options element- Returns:
thisbuilder for use in a chained invocation
-
addOptions
Adds elements tooptionslist.- Parameters:
elements- An array of options elements- Returns:
thisbuilder for use in a chained invocation
-
options
public final ImmutableExpression.SingleOrList.Builder options(Iterable<? extends Expression> elements) Sets or replaces all elements foroptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
addAllOptions
public final ImmutableExpression.SingleOrList.Builder addAllOptions(Iterable<? extends Expression> elements) Adds elements tooptionslist.- Parameters:
elements- An iterable of options elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSingleOrList.- Returns:
- An immutable instance of SingleOrList
- Throws:
IllegalStateException- if any required attributes are missing
-