Package io.substrait.function
Class ImmutableParameterizedType.IntervalDay
java.lang.Object
io.substrait.function.ParameterizedType.BaseParameterizedType
io.substrait.function.ParameterizedType.IntervalDay
io.substrait.function.ImmutableParameterizedType.IntervalDay
- All Implemented Interfaces:
NullableType,ParameterizedType,TypeExpression
- Enclosing class:
- ImmutableParameterizedType
public static final class ImmutableParameterizedType.IntervalDay
extends ParameterizedType.IntervalDay
Immutable implementation of
ParameterizedType.IntervalDay.
Use the builder to create immutable instances:
ImmutableParameterizedType.IntervalDay.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 forIntervalDay.copyOf(ParameterizedType.IntervalDay instance) Creates an immutable copy of aParameterizedType.IntervalDayvalue.booleanThis instance is equal to all instances ofIntervalDaythat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,precision.booleannullable()toString()Prints the immutable valueIntervalDaywith 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.IntervalDay- 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.IntervalDay 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 ofIntervalDaythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,precision. -
toString
Prints the immutable valueIntervalDaywith attribute values. -
copyOf
Creates an immutable copy of aParameterizedType.IntervalDayvalue. 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 IntervalDay instance
-
builder
Creates a builder forIntervalDay.ImmutableParameterizedType.IntervalDay.builder() .nullable(boolean) // requirednullable.precision(io.substrait.function.ParameterizedType.StringLiteral) // requiredprecision.build();- Returns:
- A new IntervalDay builder
-