public interface IlvLocalizedConverter extends IlvConverter
IlvConverter to support Locale. Note that localized
converters must support non localized conversion as well.| Modifier and Type | Field and Description |
|---|---|
static Class<?> |
CURRENCY_AS_NUMBER_CLASS
Constant to convert to localized currency.
|
static Class<?> |
PERCENT_AS_NUMBER_CLASS
Constant to convert to/from localized percents.
|
STRING_TYPE| Modifier and Type | Method and Description |
|---|---|
Object |
convert(Object value,
Class<?> toType,
Locale locale)
Converts the specified value to the given type.
|
Object |
convert(Object value,
Class<?> toType,
ULocale locale)
Converts the specified value to the given type.
|
convert, fromTypes, toTypesstatic final Class<?> CURRENCY_AS_NUMBER_CLASS
static final Class<?> PERCENT_AS_NUMBER_CLASS
Object convert(Object value, Class<?> toType, Locale locale) throws IlvConvertException
The converted value will be of one of the types returned by
fromTypes.
All other combinations of source/target
types declared by fromTypes/toTypes
should be handled by this method.
If the operation fails, this method must throw an exception of type
IlvConvertException.
value - the value to be converted. Assumed to be non-null.toType - the target type.locale - the locale used during the conversionIlvConvertException - if the value could not be converted to the
requested type.Object convert(Object value, Class<?> toType, ULocale locale) throws IlvConvertException
The converted value will be of one of the types returned by
fromTypes.
All other combinations of source/target
types declared by fromTypes/toTypes
should be handled by this method.
If the operation fails, this method must throw an exception of type
IlvConvertException.
value - the value to be converted. Assumed to be non-null.toType - the target type.locale - the locale used during the conversionIlvConvertException - if the value could not be converted to the
requested type.© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.