public abstract class NumberDecoder extends LocaleAwareDecoder implements DataEncoder
Number
based DataDecoder.Modifier and Type | Class and Description |
---|---|
static class |
NumberDecoder.NumberType |
DataDecoder.Factory
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT
Format.
|
static String |
TYPE
Type.
|
LOCALE, LOCALE_COUNTRY_CODE, LOCALE_LANGUAGE_CODE, VERIFY_LOCALE
Constructor and Description |
---|
NumberDecoder() |
Modifier and Type | Method and Description |
---|---|
String |
encode(Object object)
Encode an object to a string.
|
NumberFormat |
getNumberFormat()
Get the
NumberFormat instance, if one exists. |
NumberDecoder.NumberType |
getType() |
boolean |
isPercentage() |
void |
setConfiguration(Properties config)
Set the component configuration.
|
getConfiguration, getLocale, getLocale, isLocalInstalled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode
public static final String FORMAT
public static final String TYPE
public void setConfiguration(Properties config) throws SmooksConfigurationException
Configurable
setConfiguration
in interface Configurable
setConfiguration
in class LocaleAwareDecoder
config
- The component configuration properties.SmooksConfigurationException
- Bad component configuration.public NumberFormat getNumberFormat()
NumberFormat
instance, if one exists.NumberFormat
instance, otherwise null.public NumberDecoder.NumberType getType()
public boolean isPercentage()
public String encode(Object object) throws DataDecodeException
DataEncoder
encode
in interface DataEncoder
object
- The object to be encoded.DataDecodeException
- Error encoding object.Copyright © 2020. All rights reserved.