Package io.substrait.expression
Class ImmutableExpression.MapLiteral.Builder
java.lang.Object
io.substrait.expression.ImmutableExpression.MapLiteral.Builder
- Enclosing class:
- ImmutableExpression.MapLiteral
Builds instances of type
MapLiteral.
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 TypeMethodDescriptionbuild()Builds a newMapLiteral.from(Expression.Literal instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.Literalinstance.from(Expression.MapLiteral instance) Fill a builder with attribute values from the providedio.substrait.expression.Expression.MapLiteralinstance.nullable(boolean nullable) Initializes the value for thenullableattribute.putAllValues(Map<? extends Expression.Literal, ? extends Expression.Literal> entries) Put all mappings from the specified map as entries tovaluesmap.putValues(Expression.Literal key, Expression.Literal value) Put one entry to thevaluesmap.putValues(Map.Entry<? extends Expression.Literal, ? extends Expression.Literal> entry) Put one entry to thevaluesmap.values(Map<? extends Expression.Literal, ? extends Expression.Literal> entries) Sets or replaces all mappings from the specified map as entries for thevaluesmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.substrait.expression.Expression.MapLiteralinstance.- 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
-
putValues
public final ImmutableExpression.MapLiteral.Builder putValues(Expression.Literal key, Expression.Literal value) Put one entry to thevaluesmap.- Parameters:
key- The key in the values mapvalue- The associated value in the values map- Returns:
thisbuilder for use in a chained invocation
-
putValues
public final ImmutableExpression.MapLiteral.Builder putValues(Map.Entry<? extends Expression.Literal, ? extends Expression.Literal> entry) Put one entry to thevaluesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
values
public final ImmutableExpression.MapLiteral.Builder values(Map<? extends Expression.Literal, ? extends Expression.Literal> entries) Sets or replaces all mappings from the specified map as entries for thevaluesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the values map- Returns:
thisbuilder for use in a chained invocation
-
putAllValues
public final ImmutableExpression.MapLiteral.Builder putAllValues(Map<? extends Expression.Literal, ? extends Expression.Literal> entries) Put all mappings from the specified map as entries tovaluesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the values map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMapLiteral.- Returns:
- An immutable instance of MapLiteral
- Throws:
IllegalStateException- if any required attributes are missing
-