|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.types.BaseDataType
org.axiondb.types.BaseNumberDataType
public abstract class BaseNumberDataType
An abstract base DataType
for Number
types.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.axiondb.DataType |
---|
DataType.BinaryRepresentation, DataType.ExactNumeric, DataType.NonFixedPrecision |
Constructor Summary | |
---|---|
BaseNumberDataType()
|
Method Summary | |
---|---|
boolean |
accepts(java.lang.Object value)
Returns true iff value is String that can be
converted without exception, null , or a
Number . |
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)
|
Methods inherited from class org.axiondb.types.BaseDataType |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public BaseNumberDataType()
Method Detail |
---|
public boolean accepts(java.lang.Object value)
true
iff value is String
that can be
converted
without exception, null
, or a
Number
.
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |