|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.beanutils.locale.LocaleConvertUtils
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.
Constructor Summary | |
LocaleConvertUtils()
|
Method Summary | |
static java.lang.String |
convert(java.lang.Object value)
Convert the specified locale-sensitive value into a String. |
static java.lang.String |
convert(java.lang.Object value,
java.util.Locale locale,
java.lang.String pattern)
Convert the specified locale-sensitive value into a String using the paticular convertion pattern. |
static java.lang.String |
convert(java.lang.Object value,
java.lang.String pattern)
Convert the specified locale-sensitive value into a String using the convertion pattern. |
static java.lang.Object |
convert(java.lang.String[] values,
java.lang.Class clazz)
Convert an array of specified values to an array of objects of the specified class (if possible). |
static java.lang.Object |
convert(java.lang.String[] values,
java.lang.Class clazz,
java.util.Locale locale,
java.lang.String pattern)
Convert an array of specified values to an array of objects of the specified class (if possible) using the convertion pattern. |
static java.lang.Object |
convert(java.lang.String[] values,
java.lang.Class clazz,
java.lang.String pattern)
Convert an array of specified values to an array of objects of the specified class (if possible) using the convertion pattern. |
static java.lang.Object |
convert(java.lang.String value,
java.lang.Class clazz)
Convert the specified value to an object of the specified class (if possible). |
static java.lang.Object |
convert(java.lang.String value,
java.lang.Class clazz,
java.util.Locale locale,
java.lang.String pattern)
Convert the specified value to an object of the specified class (if possible) using the convertion pattern. |
static java.lang.Object |
convert(java.lang.String value,
java.lang.Class clazz,
java.lang.String pattern)
Convert the specified value to an object of the specified class (if possible) using the convertion pattern. |
protected static FastHashMap |
create(java.util.Locale locale)
Create all LocaleConverter types for specified locale. |
static void |
deregister()
Remove any registered LocaleConverter . |
static void |
deregister(java.lang.Class clazz,
java.util.Locale locale)
Remove any registered LocaleConverter for the specified locale and Class. |
static void |
deregister(java.util.Locale locale)
Remove any registered LocaleConverter for the specified locale. |
static boolean |
getApplyLocalized()
Gets applyLocalized. |
static java.util.Locale |
getDefaultLocale()
Gets the Locale which will be used when
no Locale is passed to a method. |
static LocaleConverter |
lookup(java.lang.Class clazz,
java.util.Locale locale)
Look up and return any registered LocaleConverter for the specified
destination class and locale; if there is no registered Converter, return
null . |
protected static FastHashMap |
lookup(java.util.Locale locale)
Look up and return any registered FastHashMap instance for the specified locale. |
static void |
register(LocaleConverter converter,
java.lang.Class clazz,
java.util.Locale locale)
Register a custom LocaleConverter for the specified destination
Class , replacing any previously registered converter. |
static void |
setApplyLocalized(boolean newApplyLocalized)
Sets applyLocalized. |
static void |
setDefaultLocale(java.util.Locale locale)
Sets the Locale which will be used when
no Locale is passed to a method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocaleConvertUtils()
Method Detail |
public static java.util.Locale getDefaultLocale()
Gets the Locale
which will be used when
no Locale
is passed to a method.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.getDefaultLocale()
public static void setDefaultLocale(java.util.Locale locale)
Sets the Locale
which will be used when
no Locale
is passed to a method.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.setDefaultLocale(Locale)
public static boolean getApplyLocalized()
Gets applyLocalized.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.getApplyLocalized()
public static void setApplyLocalized(boolean newApplyLocalized)
Sets applyLocalized.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.setApplyLocalized(boolean)
public static java.lang.String convert(java.lang.Object value)
Convert the specified locale-sensitive value into a String.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.convert(Object)
public static java.lang.String convert(java.lang.Object value, java.lang.String pattern)
Convert the specified locale-sensitive value into a String using the convertion pattern.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.convert(Object, String)
public static java.lang.String convert(java.lang.Object value, java.util.Locale locale, java.lang.String pattern)
Convert the specified locale-sensitive value into a String using the paticular convertion pattern.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.convert(Object, Locale, String)
public static java.lang.Object convert(java.lang.String value, java.lang.Class clazz)
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
LocaleConvertUtilsBean.convert(String, Class)
public static java.lang.Object convert(java.lang.String value, java.lang.Class clazz, java.lang.String pattern)
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
LocaleConvertUtilsBean.convert(String, Class, String)
public static java.lang.Object convert(java.lang.String value, java.lang.Class clazz, java.util.Locale locale, java.lang.String pattern)
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
LocaleConvertUtilsBean.convert(String, Class, Locale, String)
public static java.lang.Object convert(java.lang.String[] values, java.lang.Class clazz, java.lang.String pattern)
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
LocaleConvertUtilsBean.convert(String[], Class, String)
public static java.lang.Object convert(java.lang.String[] values, java.lang.Class clazz)
Convert an array of specified values to an array of objects of the specified class (if possible).
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.convert(String[], Class)
public static java.lang.Object convert(java.lang.String[] values, java.lang.Class clazz, java.util.Locale locale, java.lang.String pattern)
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
LocaleConvertUtilsBean.convert(String[], Class, Locale, String)
public static void register(LocaleConverter converter, java.lang.Class clazz, java.util.Locale locale)
Register a custom LocaleConverter
for the specified destination
Class
, replacing any previously registered converter.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.register(LocaleConverter, Class, Locale)
public static void deregister()
Remove any registered LocaleConverter
.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.deregister()
public static void deregister(java.util.Locale locale)
Remove any registered LocaleConverter
for the specified locale.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.deregister(Locale)
public static void deregister(java.lang.Class clazz, java.util.Locale locale)
Remove any registered LocaleConverter
for the specified locale and Class.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.deregister(Class, Locale)
public static LocaleConverter lookup(java.lang.Class clazz, java.util.Locale locale)
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
LocaleConvertUtilsBean.lookup(Class, Locale)
protected static FastHashMap lookup(java.util.Locale locale)
Look up and return any registered FastHashMap instance for the specified locale.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.lookup(Locale)
protected static FastHashMap create(java.util.Locale locale)
Create all LocaleConverter
types for specified locale.
For more details see LocaleConvertUtilsBean
LocaleConvertUtilsBean.create(Locale)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |