| java.lang.Object org.apache.commons.beanutils.locale.BaseLocaleConverter
All known Subclasses: org.apache.commons.beanutils.locale.converters.DecimalLocaleConverter, org.apache.commons.beanutils.locale.converters.StringLocaleConverter, org.apache.commons.beanutils.locale.converters.DateLocaleConverter,
Field Summary | |
protected boolean | locPattern The flag indicating whether the given pattern string is localized or not. | protected Locale | locale The locale specified to our Constructor, by default - system locale. | protected String | pattern The default pattern specified to our Constructor, if any. | protected boolean | useDefault |
Method Summary | |
public Object | convert(Object value) Convert the specified locale-sensitive input object into an output object. | public Object | convert(Object value, String pattern) Convert the specified locale-sensitive input object into an output object. | public Object | convert(Class type, Object value) Convert the specified locale-sensitive input object into an output object of the
specified type. | public Object | convert(Class type, Object value, String pattern) Convert the specified locale-sensitive input object into an output object of the
specified type.
Parameters: type - Data is type to which this value should be converted Parameters: value - is the input object to be converted Parameters: pattern - is the pattern is used for the conversion; if null ispassed then the default pattern associated with the converter objectwill be used. | abstract protected Object | parse(Object value, String pattern) Convert the specified locale-sensitive input object into an output object of the
specified type. |
locPattern | protected boolean locPattern(Code) | | The flag indicating whether the given pattern string is localized or not.
|
locale | protected Locale locale(Code) | | The locale specified to our Constructor, by default - system locale.
|
pattern | protected String pattern(Code) | | The default pattern specified to our Constructor, if any.
|
useDefault | protected boolean useDefault(Code) | | Should we return the default value on conversion errors?
|
BaseLocaleConverter | protected BaseLocaleConverter(Locale locale, String pattern)(Code) | | Create a
LocaleConverter that will throw a
ConversionException if a conversion error occurs.
An unlocalized pattern is used for the convertion.
Parameters: locale - The locale Parameters: pattern - The convertion pattern |
BaseLocaleConverter | protected BaseLocaleConverter(Locale locale, String pattern, boolean locPattern)(Code) | | Create a
LocaleConverter that will throw a
ConversionException if a conversion error occurs.
Parameters: locale - The locale Parameters: pattern - The convertion pattern Parameters: locPattern - Indicate whether the pattern is localized or not |
BaseLocaleConverter | protected BaseLocaleConverter(Object defaultValue, Locale locale, String pattern)(Code) | | Create a
LocaleConverter that will return the specified default value
if a conversion error occurs.
An unlocalized pattern is used for the convertion.
Parameters: defaultValue - The default value to be returned Parameters: locale - The locale Parameters: pattern - The convertion pattern |
BaseLocaleConverter | protected BaseLocaleConverter(Object defaultValue, Locale locale, String pattern, boolean locPattern)(Code) | | Create a
LocaleConverter that will return the specified default value
if a conversion error occurs.
Parameters: defaultValue - The default value to be returned Parameters: locale - The locale Parameters: pattern - The convertion pattern Parameters: locPattern - Indicate whether the pattern is localized or not |
convert | public Object convert(Object value)(Code) | | Convert the specified locale-sensitive input object into an output object.
The default pattern is used for the convertion.
Parameters: value - The input object to be converted The converted value exception: ConversionException - if conversion cannot be performedsuccessfully |
convert | public Object convert(Object value, String pattern)(Code) | | Convert the specified locale-sensitive input object into an output object.
Parameters: value - The input object to be converted Parameters: pattern - The pattern is used for the convertion The converted value exception: ConversionException - if conversion cannot be performedsuccessfully |
convert | public Object convert(Class type, Object value)(Code) | | Convert the specified locale-sensitive input object into an output object of the
specified type. The default pattern is used for the convertion.
Parameters: type - Data type to which this value should be converted Parameters: value - The input object to be converted The converted value exception: ConversionException - if conversion cannot be performedsuccessfully |
convert | public Object convert(Class type, Object value, String pattern)(Code) | | Convert the specified locale-sensitive input object into an output object of the
specified type.
Parameters: type - Data is type to which this value should be converted Parameters: value - is the input object to be converted Parameters: pattern - is the pattern is used for the conversion; if null ispassed then the default pattern associated with the converter objectwill be used. The converted value exception: ConversionException - if conversion cannot be performedsuccessfully |
parse | abstract protected Object parse(Object value, String pattern) throws ParseException(Code) | | Convert the specified locale-sensitive input object into an output object of the
specified type.
Parameters: value - The input object to be converted Parameters: pattern - The pattern is used for the convertion The converted value exception: ParseException - if conversion cannot be performedsuccessfully |
|
|