Package io.substrait.expression
Class ImmutableExpression.UserDefinedStructLiteral.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.UserDefinedStructLiteral.Builder
- Enclosing class:
- ImmutableExpression.UserDefinedStructLiteral
Builds instances of type
UserDefinedStructLiteral.
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.Literal> elements) Adds elements tofieldslist.addAllTypeParameters(Iterable<? extends Type.Parameter> elements) Adds elements totypeParameterslist.addFields(Expression.Literal element) Adds one element tofieldslist.addFields(Expression.Literal... elements) Adds elements tofieldslist.addTypeParameters(Type.Parameter element) Adds one element totypeParameterslist.addTypeParameters(Type.Parameter... elements) Adds elements totypeParameterslist.build()Builds a newUserDefinedStructLiteral.fields(Iterable<? extends Expression.Literal> elements) Sets or replaces all elements forfieldslist.from(Expression.Literal instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.from(Expression.UserDefinedLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.UserDefinedLiteralinstance.from(Expression.UserDefinedStructLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.UserDefinedStructLiteralinstance.Initializes the value for thenameattribute.nullable(boolean nullable) Initializes the value for thenullableattribute.typeParameters(Iterable<? extends Type.Parameter> elements) Sets or replaces all elements fortypeParameterslist.Initializes the value for theurnattribute.
-
Method Details
-
from
public final ImmutableExpression.UserDefinedStructLiteral.Builder from(Expression.UserDefinedStructLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.UserDefinedStructLiteralinstance.- 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
-
from
public final ImmutableExpression.UserDefinedStructLiteral.Builder from(Expression.UserDefinedLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.UserDefinedLiteralinstance.- 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
-
urn
Initializes the value for theurnattribute.- Parameters:
urn- The value for urn- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addTypeParameters
public final ImmutableExpression.UserDefinedStructLiteral.Builder addTypeParameters(Type.Parameter element) Adds one element totypeParameterslist.- Parameters:
element- A typeParameters element- Returns:
thisbuilder for use in a chained invocation
-
addTypeParameters
public final ImmutableExpression.UserDefinedStructLiteral.Builder addTypeParameters(Type.Parameter... elements) Adds elements totypeParameterslist.- Parameters:
elements- An array of typeParameters elements- Returns:
thisbuilder for use in a chained invocation
-
typeParameters
public final ImmutableExpression.UserDefinedStructLiteral.Builder typeParameters(Iterable<? extends Type.Parameter> elements) Sets or replaces all elements fortypeParameterslist.- Parameters:
elements- An iterable of typeParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTypeParameters
public final ImmutableExpression.UserDefinedStructLiteral.Builder addAllTypeParameters(Iterable<? extends Type.Parameter> elements) Adds elements totypeParameterslist.- Parameters:
elements- An iterable of typeParameters elements- Returns:
thisbuilder for use in a chained invocation
-
addFields
public final ImmutableExpression.UserDefinedStructLiteral.Builder addFields(Expression.Literal element) Adds one element tofieldslist.- Parameters:
element- A fields element- Returns:
thisbuilder for use in a chained invocation
-
addFields
public final ImmutableExpression.UserDefinedStructLiteral.Builder addFields(Expression.Literal... elements) Adds elements tofieldslist.- Parameters:
elements- An array of fields elements- Returns:
thisbuilder for use in a chained invocation
-
fields
public final ImmutableExpression.UserDefinedStructLiteral.Builder fields(Iterable<? extends Expression.Literal> 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.UserDefinedStructLiteral.Builder addAllFields(Iterable<? extends Expression.Literal> elements) Adds elements tofieldslist.- Parameters:
elements- An iterable of fields elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newUserDefinedStructLiteral.- Returns:
- An immutable instance of UserDefinedStructLiteral
- Throws:
IllegalStateException- if any required attributes are missing
-