Package io.substrait.function
Class ImmutableParameterizedType.Map
java.lang.Object
io.substrait.function.ParameterizedType.BaseParameterizedType
io.substrait.function.ParameterizedType.Map
io.substrait.function.ImmutableParameterizedType.Map
- All Implemented Interfaces:
NullableType,ParameterizedType,TypeExpression
- Enclosing class:
- ImmutableParameterizedType
Immutable implementation of
ParameterizedType.Map.
Use the builder to create immutable instances:
ImmutableParameterizedType.Map.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.function.ParameterizedType
ParameterizedType.BaseParameterizedType, ParameterizedType.Decimal, ParameterizedType.FixedBinary, ParameterizedType.FixedChar, ParameterizedType.Func, ParameterizedType.IntervalCompound, ParameterizedType.IntervalDay, ParameterizedType.ListType, ParameterizedType.Map, ParameterizedType.NullableParameterizedType, ParameterizedType.PrecisionTime, ParameterizedType.PrecisionTimestamp, ParameterizedType.PrecisionTimestampTZ, ParameterizedType.RequiredParameterizedVisitorException, ParameterizedType.StringLiteral, ParameterizedType.Struct, ParameterizedType.VarCharNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.NotOperation, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forMap.copyOf(ParameterizedType.Map instance) Creates an immutable copy of aParameterizedType.Mapvalue.booleanThis instance is equal to all instances ofMapthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,key,value.key()booleannullable()toString()Prints the immutable valueMapwith attribute values.value()withKey(ParameterizedType value) Copy the current immutable object by setting a value for thekeyattribute.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withValue(ParameterizedType value) Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class io.substrait.function.ParameterizedType.BaseParameterizedType
acceptMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.substrait.function.ParameterizedType
isWildcard
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
key
- Specified by:
keyin classParameterizedType.Map- Returns:
- The value of the
keyattribute
-
value
- Specified by:
valuein classParameterizedType.Map- Returns:
- The value of the
valueattribute
-
withNullable
Copy the current immutable object by setting a value for thenullableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nullable- Returns:
- A modified copy or the
thisobject
-
withKey
Copy the current immutable object by setting a value for thekeyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for key- Returns:
- A modified copy or the
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofMapthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,key,value. -
toString
Prints the immutable valueMapwith attribute values. -
copyOf
Creates an immutable copy of aParameterizedType.Mapvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Map instance
-
builder
Creates a builder forMap.ImmutableParameterizedType.Map.builder() .nullable(boolean) // requirednullable.key(io.substrait.function.ParameterizedType) // requiredkey.value(io.substrait.function.ParameterizedType) // requiredvalue.build();- Returns:
- A new Map builder
-