org.milyn.javabean.decoders
Class NumberDecoder
java.lang.Object
org.milyn.javabean.decoders.LocaleAwareDecoder
org.milyn.javabean.decoders.NumberDecoder
- All Implemented Interfaces:
- Serializable, Configurable, DataDecoder, DataEncoder
- Direct Known Subclasses:
- BigDecimalDecoder, BigIntegerDecoder, DoubleDecoder, FloatDecoder, IntegerDecoder, LongDecoder, ShortDecoder
public abstract class NumberDecoder
- extends LocaleAwareDecoder
- implements DataEncoder
Abstract Number based DataDecoder.
- Author:
- tom.fennelly@gmail.com
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORMAT
public static final String FORMAT
- Format.
- See Also:
- Constant Field Values
TYPE
public static final String TYPE
- Type.
- See Also:
- Constant Field Values
NumberDecoder
public NumberDecoder()
setConfiguration
public void setConfiguration(Properties config)
throws SmooksConfigurationException
- Description copied from interface:
Configurable
- Set the component configuration.
- Specified by:
setConfiguration in interface Configurable- Overrides:
setConfiguration in class LocaleAwareDecoder
- Parameters:
config - The component configuration properties.
- Throws:
SmooksConfigurationException - Bad component configuration.
getNumberFormat
public NumberFormat getNumberFormat()
- Get the
NumberFormat instance, if one exists.
- Returns:
- A clone of the
NumberFormat instance, otherwise null.
getType
public NumberDecoder.NumberType getType()
isPercentage
public boolean isPercentage()
encode
public String encode(Object object)
throws DataDecodeException
- Description copied from interface:
DataEncoder
- Encode an object to a string.
- Specified by:
encode in interface DataEncoder
- Parameters:
object - The object to be encoded.
- Returns:
- The encoded object.
- Throws:
DataDecodeException - Error encoding object.
Copyright © 2018. All rights reserved.