public class LongTypeHandler extends NumberTypeHandler
DecimalFormat
locale
FORMAT_SETTING
NIL
Constructor and Description |
---|
LongTypeHandler() |
Modifier and Type | Method and Description |
---|---|
protected Long |
createNumber(BigDecimal bg)
Parses a Number from a BigDecimal.
|
protected Long |
createNumber(String text)
Parses a Number from text.
|
Class<?> |
getType()
Returns the class type supported by this handler.
|
createDecimalFormat, format, getPattern, newInstance, parse, setPattern
getLocale, setLocale
protected Long createNumber(String text) throws NumberFormatException
NumberTypeHandler
createNumber
in class NumberTypeHandler
text
- the text to convert to a NumberNumberFormatException
- if the text is not a valid numberprotected Long createNumber(BigDecimal bg) throws ArithmeticException
NumberTypeHandler
createNumber
in class NumberTypeHandler
bg
- the BigDecimal version of the numberArithmeticException
- if the BigDecimal cannot be converted
to the Number type supported by this handlerpublic Class<?> getType()
TypeHandler