Class 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.
 
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringConverts the specified locale-sensitive value into a String.static StringConverts the specified locale-sensitive value into a String using the conversion pattern.static StringConverts the specified locale-sensitive value into a String using the particular conversion pattern.static ObjectConvert an array of specified values to an array of objects of the specified class (if possible).static ObjectConvert an array of specified values to an array of objects of the specified class (if possible) using the conversion pattern.static ObjectConvert an array of specified values to an array of objects of the specified class (if possible) using the conversion pattern.static ObjectConverts the specified value to an object of the specified class (if possible).static ObjectConverts the specified value to an object of the specified class (if possible) using the conversion pattern.static ObjectConverts the specified value to an object of the specified class (if possible) using the conversion pattern.static voidRemove any registeredLocaleConverter.static voidderegister(Class<?> clazz, Locale locale) Remove any registeredLocaleConverterfor the specified locale and Class.static voidderegister(Locale locale) Remove any registeredLocaleConverterfor the specified locale.static booleanGets applyLocalized.static Localestatic <T> LocaleConverter<T> Look up and return any registeredLocaleConverterfor the specified destination class and locale; if there is no registered Converter, returnnull.static <T> voidregister(LocaleConverter<T> converter, Class<T> clazz, Locale locale) Register a customLocaleConverterfor the specified destinationClass, replacing any previously registered converter.static voidsetApplyLocalized(boolean newApplyLocalized) Sets applyLocalized.static voidsetDefaultLocale(Locale locale) 
- 
Method Details- 
convertConverts the specified locale-sensitive value into a String. For more details see LocaleConvertUtilsBean- Parameters:
- value- The Value to be converted
- Returns:
- the converted value
- See Also:
 
- 
convertConverts the specified locale-sensitive value into a String using the particular conversion pattern. For more details see LocaleConvertUtilsBean- Parameters:
- value- The Value to be converted
- locale- The locale
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
convertConverts the specified locale-sensitive value into a String using the conversion pattern. For more details see LocaleConvertUtilsBean- Parameters:
- value- The Value to be converted
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
convertConverts 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
- clazz- The Data type to which this value should be converted.
- Returns:
- the converted value
- See Also:
 
- 
convertConverts the specified value to an object of the specified class (if possible) using the conversion pattern. Otherwise, return a String representation of the value. For more details see LocaleConvertUtilsBean- Parameters:
- value- The String scalar value to be converted
- clazz- The Data type to which this value should be converted.
- locale- The locale
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
convertConverts the specified value to an object of the specified class (if possible) using the conversion pattern. Otherwise, return a String representation of the value. For more details see LocaleConvertUtilsBean- Parameters:
- value- The String scalar value to be converted
- clazz- The Data type to which this value should be converted.
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
convertConvert 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)
- clazz- Java array or element class to be converted to
- Returns:
- the converted value
- See Also:
 
- 
convertConvert an array of specified values to an array of objects of the specified class (if possible) using the conversion pattern. For more details see LocaleConvertUtilsBean- Parameters:
- values- Value to be converted (may be null)
- clazz- Java array or element class to be converted to
- locale- The locale
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
convertConvert an array of specified values to an array of objects of the specified class (if possible) using the conversion pattern. For more details see LocaleConvertUtilsBean- Parameters:
- values- Value to be converted (may be null)
- clazz- Java array or element class to be converted to
- pattern- The conversion pattern
- Returns:
- the converted value
- See Also:
 
- 
deregisterRemove any registered LocaleConverter.For more details see LocaleConvertUtilsBean- See Also:
 
- 
deregisterRemove any registered LocaleConverterfor the specified locale and Class.For more details see LocaleConvertUtilsBean- Parameters:
- clazz- Class for which to remove a registered Converter
- locale- The locale
- See Also:
 
- 
deregisterRemove any registered LocaleConverterfor the specified locale.For more details see LocaleConvertUtilsBean- Parameters:
- locale- The locale
- See Also:
 
- 
getApplyLocalizedGets applyLocalized. For more details see LocaleConvertUtilsBean- Returns:
- trueif pattern is localized, otherwise- false
- See Also:
 
- 
getDefaultLocaleGets the Localewhich will be used when noLocaleis passed to a method.For more details see LocaleConvertUtilsBean- Returns:
- the default locale
- See Also:
 
- 
lookupLook up and return any registered LocaleConverterfor the specified destination class and locale; if there is no registered Converter, returnnull.For more details see LocaleConvertUtilsBean- Type Parameters:
- T- The converter type.
- Parameters:
- clazz- Class for which to return a registered Converter
- locale- The Locale
- Returns:
- The registered locale Converter, if any
- See Also:
 
- 
registerRegister a custom LocaleConverterfor the specified destinationClass, replacing any previously registered converter.For more details see LocaleConvertUtilsBean- Type Parameters:
- T- The converter type.
- Parameters:
- converter- The LocaleConverter to be registered
- clazz- The Destination class for conversions performed by this Converter
- locale- The locale
- See Also:
 
- 
setApplyLocalizedSets applyLocalized. For more details see LocaleConvertUtilsBean- Parameters:
- newApplyLocalized-- trueif pattern is localized, otherwise- false
- See Also:
 
- 
setDefaultLocaleSets the Localewhich will be used when noLocaleis passed to a method.For more details see LocaleConvertUtilsBean- Parameters:
- locale- the default locale
- See Also:
 
 
-