Package io.substrait.expression
Class ImmutableExpression.NestedStruct.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.NestedStruct.Builder
- Enclosing class:
- ImmutableExpression.NestedStruct
Builds instances of type
NestedStruct.
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 TypeMethodDescriptionaddAllFields(Iterable<? extends Expression> elements) Adds elements tofieldslist.addFields(Expression element) Adds one element tofieldslist.addFields(Expression... elements) Adds elements tofieldslist.build()Builds a newNestedStruct.fields(Iterable<? extends Expression> elements) Sets or replaces all elements forfieldslist.from(Expression.Nested instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Nestedinstance.from(Expression.NestedStruct instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.NestedStructinstance.nullable(boolean nullable) Initializes the value for thenullableattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.Nestedinstance.- 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.NestedStructinstance.- 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
-
addFields
Adds one element tofieldslist.- Parameters:
element- A fields element- Returns:
thisbuilder for use in a chained invocation
-
addFields
Adds elements tofieldslist.- Parameters:
elements- An array of fields elements- Returns:
thisbuilder for use in a chained invocation
-
fields
public final ImmutableExpression.NestedStruct.Builder fields(Iterable<? extends Expression> elements) Sets or replaces all elements forfieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
addAllFields
public final ImmutableExpression.NestedStruct.Builder addAllFields(Iterable<? extends Expression> elements) Adds elements tofieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newNestedStruct.- Returns:
- An immutable instance of NestedStruct
- Throws:
IllegalStateException- if any required attributes are missing
-