Package org.smooks.engine.converter
Class NumberTypeConverter<S,T>
- java.lang.Object
-
- org.smooks.engine.converter.LocaleAwareTypeConverter<S,T>
-
- org.smooks.engine.converter.NumberTypeConverter<S,T>
-
- All Implemented Interfaces:
org.smooks.api.converter.TypeConverter<S,T>,org.smooks.api.resource.config.Configurable
- Direct Known Subclasses:
NumberToStringConverter,StringToDoubleConverterFactory.StringToDoubleTypeConverter
public abstract class NumberTypeConverter<S,T> extends LocaleAwareTypeConverter<S,T>
AbstractNumberbased DataDecoder.- Author:
- tom.fennelly@gmail.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNumberTypeConverter.NumberType
-
Field Summary
Fields Modifier and Type Field Description static StringFORMATprotected NumberFormatnumberFormatstatic StringTYPE-
Fields inherited from class org.smooks.engine.converter.LocaleAwareTypeConverter
LOCALE, LOCALE_COUNTRY_CODE, LOCALE_LANGUAGE_CODE, VERIFY_LOCALE
-
-
Constructor Summary
Constructors Constructor Description NumberTypeConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tconvert(S value)protected abstract TdoConvert(S value)NumberFormatgetNumberFormat()Get theNumberFormatinstance, if one exists.NumberTypeConverter.NumberTypegetType()booleanisPercentage()voidsetConfiguration(Properties properties)-
Methods inherited from class org.smooks.engine.converter.LocaleAwareTypeConverter
getConfiguration, getLocale, getLocale, isLocalInstalled
-
-
-
-
Field Detail
-
FORMAT
public static final String FORMAT
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
numberFormat
protected NumberFormat numberFormat
-
-
Method Detail
-
setConfiguration
public void setConfiguration(Properties properties) throws org.smooks.api.SmooksConfigException
- Specified by:
setConfigurationin interfaceorg.smooks.api.resource.config.Configurable- Overrides:
setConfigurationin classLocaleAwareTypeConverter<S,T>- Throws:
org.smooks.api.SmooksConfigException
-
getNumberFormat
public NumberFormat getNumberFormat()
Get theNumberFormatinstance, if one exists.- Returns:
- A clone of the
NumberFormatinstance, otherwise null.
-
getType
public NumberTypeConverter.NumberType getType()
-
isPercentage
public boolean isPercentage()
-
-