org.axiondb.types

Class BaseNumberDataType

public abstract class BaseNumberDataType extends BaseDataType

An abstract base DataTypefor Numbertypes.

Version: $Revision: 1.9 $ $Date: 2005/05/02 22:29:40 $

Author: Rodney Waldhoff

Constructor Summary
BaseNumberDataType()
Method Summary
booleanaccepts(Object value)
Returns true iff value is String that can be convertedwithout exception, null, or a Number Number.
Objectconvert(Object value)
Returns value if value is null and throws IllegalArgumentExceptionotherwise.
booleansupportsSuccessor()
This base implementation returns true.
protected NumbertoNumber(Object value)

Constructor Detail

BaseNumberDataType

public BaseNumberDataType()

Method Detail

accepts

public boolean accepts(Object value)
Returns true iff value is String that can be convertedwithout exception, null, or a Number Number.

convert

public Object convert(Object value)
Returns value if value is null and throws IllegalArgumentExceptionotherwise. Subclasses should override this method and call super.convert(value) as their last case.

Throws: AxionException

supportsSuccessor

public boolean supportsSuccessor()
This base implementation returns true.

toNumber

protected Number toNumber(Object value)