Package io.substrait.function
Class ImmutableTypeExpression.Decimal
java.lang.Object
io.substrait.function.TypeExpression.BaseTypeExpression
io.substrait.function.TypeExpression.Decimal
io.substrait.function.ImmutableTypeExpression.Decimal
- All Implemented Interfaces:
NullableType,TypeExpression
- Enclosing class:
- ImmutableTypeExpression
Immutable implementation of
TypeExpression.Decimal.
Use the builder to create immutable instances:
ImmutableTypeExpression.Decimal.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.Decimal, TypeExpression.FixedBinary, TypeExpression.FixedChar, TypeExpression.Func, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.IntervalCompound, TypeExpression.IntervalDay, TypeExpression.ListType, TypeExpression.Map, TypeExpression.NotOperation, TypeExpression.PrecisionTime, TypeExpression.PrecisionTimestamp, TypeExpression.PrecisionTimestampTZ, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram, TypeExpression.Struct, TypeExpression.VarChar -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forDecimal.copyOf(TypeExpression.Decimal instance) Creates an immutable copy of aTypeExpression.Decimalvalue.booleanThis instance is equal to all instances ofDecimalthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,scale,precision.booleannullable()scale()toString()Prints the immutable valueDecimalwith attribute values.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withPrecision(TypeExpression value) Copy the current immutable object by setting a value for theprecisionattribute.withScale(TypeExpression value) Copy the current immutable object by setting a value for thescaleattribute.Methods inherited from class io.substrait.function.TypeExpression.BaseTypeExpression
accept
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
scale
- Specified by:
scalein classTypeExpression.Decimal- Returns:
- The value of the
scaleattribute
-
precision
- Specified by:
precisionin classTypeExpression.Decimal- 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
-
withScale
Copy the current immutable object by setting a value for thescaleattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scale- Returns:
- A modified copy or the
thisobject
-
withPrecision
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 ofDecimalthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,scale,precision. -
toString
Prints the immutable valueDecimalwith attribute values. -
copyOf
Creates an immutable copy of aTypeExpression.Decimalvalue. 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 Decimal instance
-
builder
Creates a builder forDecimal.ImmutableTypeExpression.Decimal.builder() .nullable(boolean) // requirednullable.scale(io.substrait.function.TypeExpression) // requiredscale.precision(io.substrait.function.TypeExpression) // requiredprecision.build();- Returns:
- A new Decimal builder
-