Package io.substrait.function
Class ImmutableParameterizedType.Struct
java.lang.Object
io.substrait.function.ParameterizedType.BaseParameterizedType
io.substrait.function.ParameterizedType.Struct
io.substrait.function.ImmutableParameterizedType.Struct
- All Implemented Interfaces:
NullableType,ParameterizedType,TypeExpression
- Enclosing class:
- ImmutableParameterizedType
Immutable implementation of
ParameterizedType.Struct.
Use the builder to create immutable instances:
ImmutableParameterizedType.Struct.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 forStruct.copyOf(ParameterizedType.Struct instance) Creates an immutable copy of aParameterizedType.Structvalue.booleanThis instance is equal to all instances ofStructthat have equal attribute values.fields()inthashCode()Computes a hash code from attributes:nullable,fields.booleannullable()toString()Prints the immutable valueStructwith attribute values.withFields(ParameterizedType... elements) Copy the current immutable object with elements that replace the content offields.withFields(Iterable<? extends ParameterizedType> elements) Copy the current immutable object with elements that replace the content offields.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.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
-
fields
- Specified by:
fieldsin classParameterizedType.Struct- Returns:
- The value of the
fieldsattribute
-
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
-
withFields
Copy the current immutable object with elements that replace the content offields.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFields
public final ImmutableParameterizedType.Struct withFields(Iterable<? extends ParameterizedType> elements) Copy the current immutable object with elements that replace the content offields. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of fields elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofStructthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,fields. -
toString
Prints the immutable valueStructwith attribute values. -
copyOf
Creates an immutable copy of aParameterizedType.Structvalue. 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 Struct instance
-
builder
Creates a builder forStruct.ImmutableParameterizedType.Struct.builder() .nullable(boolean) // requirednullable.addFields|addAllFields(io.substrait.function.ParameterizedType) //fieldselements .build();- Returns:
- A new Struct builder
-