public class BigDecimalTypeInfo extends BasicTypeInfo<BigDecimal>
TypeInformation
for BigDecimal
.
It differs from BasicTypeInfo.BIG_DEC_TYPE_INFO
in that: This type includes
`precision` and `scale`, similar to SQL DECIMAL.
BIG_DEC_TYPE_INFO, BIG_INT_TYPE_INFO, BOOLEAN_TYPE_INFO, BYTE_TYPE_INFO, CHAR_TYPE_INFO, DATE_TYPE_INFO, DOUBLE_TYPE_INFO, FLOAT_TYPE_INFO, INSTANT_TYPE_INFO, INT_TYPE_INFO, LONG_TYPE_INFO, SHORT_TYPE_INFO, STRING_TYPE_INFO, VOID_TYPE_INFO
Constructor and Description |
---|
BigDecimalTypeInfo(int precision,
int scale) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
static BigDecimalTypeInfo |
of(BigDecimal value) |
static BigDecimalTypeInfo |
of(int precision,
int scale) |
int |
precision() |
int |
scale() |
boolean |
shouldAutocastTo(BasicTypeInfo<?> to)
Returns whether this type should be automatically casted to the target type in an arithmetic
operation.
|
String |
toString() |
canEqual, createComparator, createSerializer, createSerializer, getArity, getInfoFor, getTotalFields, getTypeClass, isBasicType, isKeyType, isTupleType
getGenericParameters, isSortKeyType, of, of
public static BigDecimalTypeInfo of(int precision, int scale)
public static BigDecimalTypeInfo of(BigDecimal value)
public String toString()
toString
in class BasicTypeInfo<BigDecimal>
public boolean equals(Object obj)
equals
in class BasicTypeInfo<BigDecimal>
public int hashCode()
hashCode
in class BasicTypeInfo<BigDecimal>
public boolean shouldAutocastTo(BasicTypeInfo<?> to)
BasicTypeInfo
shouldAutocastTo
in class BasicTypeInfo<BigDecimal>
public int precision()
public int scale()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.