public abstract class BaseNumberDataType extends BaseDataType
DataTypefor Numbertypes.DataType.BinaryRepresentation, DataType.ExactNumeric, DataType.NonFixedPrecision| Constructor and Description |
|---|
BaseNumberDataType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(java.lang.Object value)
|
java.lang.Object |
convert(java.lang.Object value)
Returns value if value is
null and throws
IllegalArgumentExceptionotherwise. |
boolean |
supportsSuccessor()
This base implementation returns
true. |
protected java.lang.Number |
toNumber(java.lang.Object value) |
compare, getColumnDisplaySize, getComparator, getJdbcType, getLiteralPrefix, getLiteralSuffix, getNullableCode, getPrecision, getPrecisionRadix, getPreferredValueClassName, getScale, getSearchableCode, isCaseSensitive, isCurrency, isUnsigned, makeNewInstance, read, successor, toBigDecimal, toBigInteger, toBlob, toBoolean, toByte, toByteArray, toClob, toDate, toDouble, toFloat, toInt, toLong, toShort, toString, toTime, toTimestamp, toURL, writepublic boolean accepts(java.lang.Object value)
accepts in interface DataTypeaccepts in class BaseDataTypevalue - non- null valuepublic java.lang.Object convert(java.lang.Object value)
throws AxionException
null and throws
IllegalArgumentExceptionotherwise. Subclasses should override this method
and call super.convert(value) as their last case.convert in interface DataTypeconvert in class BaseDataTypeAxionExceptionpublic boolean supportsSuccessor()
true.supportsSuccessor in interface DataTypesupportsSuccessor in class BaseDataTypeprotected java.lang.Number toNumber(java.lang.Object value)
throws AxionException
toNumber in class BaseDataTypeAxionException