public abstract class BaseNumberDataType extends BaseDataType
DataType
for Number
types.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
IllegalArgumentException otherwise. |
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, write
public boolean accepts(java.lang.Object value)
accepts
in interface DataType
accepts
in class BaseDataType
value
- non- null
valuepublic java.lang.Object convert(java.lang.Object value) throws AxionException
null
and throws
IllegalArgumentException
otherwise. Subclasses should override this method
and call super.convert(value)
as their last case.convert
in interface DataType
convert
in class BaseDataType
AxionException
public boolean supportsSuccessor()
true
.supportsSuccessor
in interface DataType
supportsSuccessor
in class BaseDataType
protected java.lang.Number toNumber(java.lang.Object value) throws AxionException
toNumber
in class BaseDataType
AxionException