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, isLocalInstalledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdecodepublic static final String FORMAT
public static final String TYPE
public void setConfiguration(Properties config) throws SmooksConfigurationException
ConfigurablesetConfiguration in interface ConfigurablesetConfiguration in class LocaleAwareDecoderconfig - 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
DataEncoderencode in interface DataEncoderobject - The object to be encoded.DataDecodeException - Error encoding object.Copyright © 2020. All rights reserved.