| java.lang.Object org.apache.commons.beanutils.locale.LocaleConvertUtils
LocaleConvertUtils | public class LocaleConvertUtils (Code) | | Utility methods for converting locale-sensitive String scalar values to objects of the
specified Class, String arrays to arrays of the specified Class and
object to locale-sensitive String scalar value.
The implementations for these method are provided by
LocaleConvertUtilsBean .
These static utility method use the default instance. More sophisticated can be provided
by using a LocaleConvertUtilsBean instance.
author: Yauheny Mikulski |
Method Summary | |
public static String | convert(Object value) | public static String | convert(Object value, String pattern) | public static String | convert(Object value, Locale locale, String pattern) | public static Object | convert(String value, Class clazz) Convert the specified value to an object of the specified class (if
possible). | public static Object | convert(String value, Class clazz, String pattern) Convert the specified value to an object of the specified class (if
possible) using the convertion pattern. | public static Object | convert(String value, Class clazz, Locale locale, String pattern) Convert the specified value to an object of the specified class (if
possible) using the convertion pattern. | public static Object | convert(String[] values, Class clazz, String pattern) | public static Object | convert(String[] values, Class clazz) | public static Object | convert(String[] values, Class clazz, Locale locale, String pattern) | protected static FastHashMap | create(Locale locale) | public static void | deregister() | public static void | deregister(Locale locale) | public static void | deregister(Class clazz, Locale locale) | public static boolean | getApplyLocalized() | public static Locale | getDefaultLocale() | public static LocaleConverter | lookup(Class clazz, Locale locale) | protected static FastHashMap | lookup(Locale locale) | public static void | register(LocaleConverter converter, Class clazz, Locale locale) | public static void | setApplyLocalized(boolean newApplyLocalized) | public static void | setDefaultLocale(Locale locale) |
convert | public static String convert(Object value, String pattern)(Code) | | Convert the specified locale-sensitive value into a String
using the conversion pattern.
For more details see LocaleConvertUtilsBean
Parameters: value - The Value to be converted Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(ObjectString) |
convert | public static String convert(Object value, Locale locale, String pattern)(Code) | | Convert the specified locale-sensitive value into a String
using the paticular convertion pattern.
For more details see LocaleConvertUtilsBean
Parameters: value - The Value to be converted Parameters: locale - The locale Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(ObjectLocaleString) |
convert | public static Object convert(String value, Class clazz)(Code) | | Convert the specified value to an object of the specified class (if
possible). Otherwise, return a String representation of the value.
For more details see LocaleConvertUtilsBean
Parameters: value - The String scalar value to be converted Parameters: clazz - The Data type to which this value should be converted. the converted value See Also: LocaleConvertUtilsBean.convert(StringClass) |
convert | public static Object convert(String value, Class clazz, String pattern)(Code) | | Convert the specified value to an object of the specified class (if
possible) using the convertion pattern. Otherwise, return a String
representation of the value.
For more details see LocaleConvertUtilsBean
Parameters: value - The String scalar value to be converted Parameters: clazz - The Data type to which this value should be converted. Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(StringClassString) |
convert | public static Object convert(String value, Class clazz, Locale locale, String pattern)(Code) | | Convert the specified value to an object of the specified class (if
possible) using the convertion pattern. Otherwise, return a String
representation of the value.
For more details see LocaleConvertUtilsBean
Parameters: value - The String scalar value to be converted Parameters: clazz - The Data type to which this value should be converted. Parameters: locale - The locale Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(StringClassLocaleString) |
convert | public static Object convert(String[] values, Class clazz, String pattern)(Code) | | Convert an array of specified values to an array of objects of the
specified class (if possible) using the convertion pattern.
For more details see LocaleConvertUtilsBean
Parameters: values - Value to be converted (may be null) Parameters: clazz - Java array or element class to be converted to Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(String[]ClassString) |
convert | public static Object convert(String[] values, Class clazz)(Code) | | Convert an array of specified values to an array of objects of the
specified class (if possible).
For more details see LocaleConvertUtilsBean
Parameters: values - Value to be converted (may be null) Parameters: clazz - Java array or element class to be converted to the converted value See Also: LocaleConvertUtilsBean.convert(String[]Class) |
convert | public static Object convert(String[] values, Class clazz, Locale locale, String pattern)(Code) | | Convert an array of specified values to an array of objects of the
specified class (if possible) using the convertion pattern.
For more details see LocaleConvertUtilsBean
Parameters: values - Value to be converted (may be null) Parameters: clazz - Java array or element class to be converted to Parameters: locale - The locale Parameters: pattern - The convertion pattern the converted value See Also: LocaleConvertUtilsBean.convert(String[]ClassLocaleString) |
lookup | public static LocaleConverter lookup(Class clazz, Locale locale)(Code) | | Look up and return any registered
LocaleConverter for the specified
destination class and locale; if there is no registered Converter, return
null .
For more details see LocaleConvertUtilsBean
Parameters: clazz - Class for which to return a registered Converter Parameters: locale - The Locale The registered locale Converter, if any See Also: LocaleConvertUtilsBean.lookup(ClassLocale) |
setApplyLocalized | public static void setApplyLocalized(boolean newApplyLocalized)(Code) | | Sets applyLocalized.
For more details see LocaleConvertUtilsBean
Parameters: newApplyLocalized - true if pattern is localized,otherwise false See Also: LocaleConvertUtilsBean.setApplyLocalized(boolean) |
|
|