Package io.substrait.function
Class ImmutableParameterizedType.PrecisionTime
java.lang.Object
io.substrait.function.ParameterizedType.BaseParameterizedType
io.substrait.function.ParameterizedType.PrecisionTime
io.substrait.function.ImmutableParameterizedType.PrecisionTime
- All Implemented Interfaces:
NullableType,ParameterizedType,TypeExpression
- Enclosing class:
- ImmutableParameterizedType
public static final class ImmutableParameterizedType.PrecisionTime
extends ParameterizedType.PrecisionTime
Immutable implementation of
ParameterizedType.PrecisionTime.
Use the builder to create immutable instances:
ImmutableParameterizedType.PrecisionTime.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 forPrecisionTime.copyOf(ParameterizedType.PrecisionTime instance) Creates an immutable copy of aParameterizedType.PrecisionTimevalue.booleanThis instance is equal to all instances ofPrecisionTimethat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,precision.booleannullable()toString()Prints the immutable valuePrecisionTimewith attribute values.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.Copy the current immutable object by setting a value for theprecisionattribute.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
-
precision
- Specified by:
precisionin classParameterizedType.PrecisionTime- Returns:
- The value of the
precisionattribute
-
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
-
withPrecision
public final ImmutableParameterizedType.PrecisionTime withPrecision(ParameterizedType.StringLiteral value) Copy the current immutable object by setting a value for theprecisionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for precision- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofPrecisionTimethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,precision. -
toString
Prints the immutable valuePrecisionTimewith attribute values. -
copyOf
public static ImmutableParameterizedType.PrecisionTime copyOf(ParameterizedType.PrecisionTime instance) Creates an immutable copy of aParameterizedType.PrecisionTimevalue. 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 PrecisionTime instance
-
builder
Creates a builder forPrecisionTime.ImmutableParameterizedType.PrecisionTime.builder() .nullable(boolean) // requirednullable.precision(io.substrait.function.ParameterizedType.StringLiteral) // requiredprecision.build();- Returns:
- A new PrecisionTime builder
-