? 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.
- ??:
- $Id$
-
?????
??? -
????
??????????static String
Convert the specified locale-sensitive value into a String.static String
Convert the specified locale-sensitive value into a String using the conversion pattern.static String
Convert the specified locale-sensitive value into a String using the paticular convertion pattern.static Object
Convert an array of specified values to an array of objects of the specified class (if possible).static Object
Convert an array of specified values to an array of objects of the specified class (if possible) using the convertion pattern.static Object
Convert an array of specified values to an array of objects of the specified class (if possible) using the convertion pattern.static Object
Convert the specified value to an object of the specified class (if possible).static Object
Convert the specified value to an object of the specified class (if possible) using the convertion pattern.static Object
Convert the specified value to an object of the specified class (if possible) using the convertion pattern.protected static org.apache.commons.collections.FastHashMap
????This method will be modified to return a Map in the next release.static void
Remove any registeredLocaleConverter
.static void
deregister
(Class<?> clazz, Locale locale) Remove any registeredLocaleConverter
for the specified locale and Class.static void
deregister
(Locale locale) Remove any registeredLocaleConverter
for the specified locale.static boolean
Gets applyLocalized.static Locale
Gets theLocale
which will be used when noLocale
is passed to a method.static LocaleConverter
Look up and return any registeredLocaleConverter
for the specified destination class and locale; if there is no registered Converter, returnnull
.protected static org.apache.commons.collections.FastHashMap
????This method will be modified to return a Map in the next release.static void
register
(LocaleConverter converter, Class<?> clazz, Locale locale) Register a customLocaleConverter
for the specified destinationClass
, replacing any previously registered converter.static void
setApplyLocalized
(boolean newApplyLocalized) Sets applyLocalized.static void
setDefaultLocale
(Locale locale) Sets theLocale
which will be used when noLocale
is passed to a method.
-
???????
-
LocaleConvertUtils
public LocaleConvertUtils()
-
-
??????
-
getDefaultLocale
Gets the
Locale
which will be used when noLocale
is passed to a method.For more details see
LocaleConvertUtilsBean
- ??:
- the default locale
- ????:
-
setDefaultLocale
Sets the
Locale
which will be used when noLocale
is passed to a method.For more details see
LocaleConvertUtilsBean
- ??:
locale
- the default locale- ????:
-
getApplyLocalized
Gets applyLocalized.
For more details see
LocaleConvertUtilsBean
- ??:
true
if pattern is localized, otherwisefalse
- ????:
-
setApplyLocalized
Sets applyLocalized.
For more details see
LocaleConvertUtilsBean
- ??:
newApplyLocalized
-true
if pattern is localized, otherwisefalse
- ????:
-
convert
Convert the specified locale-sensitive value into a String.
For more details see
LocaleConvertUtilsBean
- ??:
value
- The Value to be converted- ??:
- the converted value
- ????:
-
convert
Convert the specified locale-sensitive value into a String using the conversion pattern.
For more details see
LocaleConvertUtilsBean
- ??:
value
- The Value to be convertedpattern
- The convertion pattern- ??:
- the converted value
- ????:
-
convert
Convert the specified locale-sensitive value into a String using the paticular convertion pattern.
For more details see
LocaleConvertUtilsBean
- ??:
value
- The Value to be convertedlocale
- The localepattern
- The convertion pattern- ??:
- the converted value
- ????:
-
convert
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
- ??:
value
- The String scalar value to be convertedclazz
- The Data type to which this value should be converted.- ??:
- the converted value
- ????:
-
convert
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
- ??:
value
- The String scalar value to be convertedclazz
- The Data type to which this value should be converted.pattern
- The convertion pattern- ??:
- the converted value
- ????:
-
convert
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
- ??:
value
- The String scalar value to be convertedclazz
- The Data type to which this value should be converted.locale
- The localepattern
- The convertion pattern- ??:
- the converted value
- ????:
-
convert
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
- ??:
values
- Value to be converted (may be null)clazz
- Java array or element class to be converted topattern
- The convertion pattern- ??:
- the converted value
- ????:
-
convert
Convert an array of specified values to an array of objects of the specified class (if possible).
For more details see
LocaleConvertUtilsBean
- ??:
values
- Value to be converted (may be null)clazz
- Java array or element class to be converted to- ??:
- the converted value
- ????:
-
convert
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
- ??:
values
- Value to be converted (may be null)clazz
- Java array or element class to be converted tolocale
- The localepattern
- The convertion pattern- ??:
- the converted value
- ????:
-
register
Register a custom
LocaleConverter
for the specified destinationClass
, replacing any previously registered converter.For more details see
LocaleConvertUtilsBean
- ??:
converter
- The LocaleConverter to be registeredclazz
- The Destination class for conversions performed by this Converterlocale
- The locale- ????:
-
deregister
Remove any registered
LocaleConverter
.For more details see
LocaleConvertUtilsBean
-
deregister
Remove any registered
LocaleConverter
for the specified locale.For more details see
LocaleConvertUtilsBean
- ??:
locale
- The locale- ????:
-
deregister
Remove any registered
LocaleConverter
for the specified locale and Class.For more details see
LocaleConvertUtilsBean
- ??:
clazz
- Class for which to remove a registered Converterlocale
- The locale- ????:
-
lookup
Look up and return any registered
LocaleConverter
for the specified destination class and locale; if there is no registered Converter, returnnull
.For more details see
LocaleConvertUtilsBean
- ??:
clazz
- Class for which to return a registered Converterlocale
- The Locale- ??:
- The registered locale Converter, if any
- ????:
-
lookup
????This method will be modified to return a Map in the next release.Look up and return any registered FastHashMap instance for the specified locale.
For more details see
LocaleConvertUtilsBean
- ??:
locale
- The Locale- ??:
- The FastHashMap instance contains the all
LocaleConverter
types for the specified locale. - ????:
-
create
????This method will be modified to return a Map in the next release.Create all
LocaleConverter
types for specified locale.For more details see
LocaleConvertUtilsBean
- ??:
locale
- The Locale- ??:
- The FastHashMap instance contains the all
LocaleConverter
types for the specified locale. - ????:
-