Package io.substrait.expression
Class ImmutableExpression.ListLiteral.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.ListLiteral.Builder
- Enclosing class:
- ImmutableExpression.ListLiteral
Builds instances of type
ListLiteral.
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 TypeMethodDescriptionaddAllValues(Iterable<? extends Expression.Literal> elements) Adds elements tovalueslist.addValues(Expression.Literal element) Adds one element tovalueslist.addValues(Expression.Literal... elements) Adds elements tovalueslist.build()Builds a newListLiteral.from(Expression.ListLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.ListLiteralinstance.from(Expression.Literal instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.nullable(boolean nullable) Initializes the value for thenullableattribute.values(Iterable<? extends Expression.Literal> elements) Sets or replaces all elements forvalueslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.ListLiteralinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
nullable
Initializes the value for thenullableattribute.If not set, this attribute will have a default value as returned by the initializer of
nullable.- Parameters:
nullable- The value for nullable- Returns:
thisbuilder for use in a chained invocation
-
addValues
Adds one element tovalueslist.- Parameters:
element- A values element- Returns:
thisbuilder for use in a chained invocation
-
addValues
Adds elements tovalueslist.- Parameters:
elements- An array of values elements- Returns:
thisbuilder for use in a chained invocation
-
values
public final ImmutableExpression.ListLiteral.Builder values(Iterable<? extends Expression.Literal> elements) Sets or replaces all elements forvalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
addAllValues
public final ImmutableExpression.ListLiteral.Builder addAllValues(Iterable<? extends Expression.Literal> elements) Adds elements tovalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newListLiteral.- Returns:
- An immutable instance of ListLiteral
- Throws:
IllegalStateException- if any required attributes are missing
-