|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.util.converter.AbstractConverter
lumis.util.converter.NumberConverter
public class NumberConverter
This converter is able to do conversion between Number
subtypes in
the java.lang package and String.
Constructor Summary | |
---|---|
NumberConverter()
|
Method Summary | ||
---|---|---|
protected java.text.NumberFormat |
createNumberFormat(java.util.Locale locale,
java.lang.String pattern)
Creates the NumberFormat for the given locale and pattern. |
|
protected
|
doConversion(java.lang.Class<T> type,
java.lang.Object value,
java.util.Locale locale,
java.lang.String pattern)
Converts the specified input object into an output object of the specified type. |
Methods inherited from class lumis.util.converter.AbstractConverter |
---|
convert, convert, convert, doesNullValueReturnNull, doesValueInstanceOfTypeReturnValue, getDefaultLocale, getDefaultPattern, setDefaultLocale, setDefaultPattern, setFallbackToRegisteredConverters, shouldFallbackToRegisteredConverters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NumberConverter()
Method Detail |
---|
protected java.text.NumberFormat createNumberFormat(java.util.Locale locale, java.lang.String pattern)
locale
- the locale.pattern
- the pattern.
NumberFormat
protected <T> T doConversion(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale, java.lang.String pattern) throws UnsupportedConversionTypeException
AbstractConverter
doConversion
in class AbstractConverter
T
- generics support for the data type specified.type
- data type to which the value should be converted.value
- the input value to be converted.locale
- locale to be used during conversion, if necessary.pattern
- converter specific conversion pattern, to be used during conversion, if necessary.
UnsupportedConversionTypeException
- if this converter does not supports converting to the specified type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |