public final class LocaleUtils extends Object
| Constructor and Description |
|---|
LocaleUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String[] |
decodeLocaleCode(String localeCode)
Decodes locale code in string array that can be used for
Locale constructor. |
static DateFormatSymbols |
getDateFormatSymbols(Locale locale)
Returns cached
DateFormatSymbols instance for specified locale. |
static Locale |
getLocale(String languageCode)
Returns Locale from cache where Locale may be specified also using language code.
|
static Locale |
getLocale(String language,
String country)
Returns Locale from cache.
|
static Locale |
getLocale(String language,
String country,
String variant)
Returns Locale from cache.
|
static NumberFormat |
getNumberFormat(Locale locale)
Returns cached
NumberFormat instance for specified locale. |
static String |
resolveLocaleCode(Locale locale)
Resolves locale code from locale.
|
static String |
resolveLocaleCode(String lang,
String country,
String variant)
Transforms locale data to locale code.
|
public static Locale getLocale(String language, String country, String variant)
public static Locale getLocale(String language, String country)
public static Locale getLocale(String languageCode)
public static String resolveLocaleCode(String lang, String country, String variant)
null values are allowed.public static String resolveLocaleCode(Locale locale)
public static String[] decodeLocaleCode(String localeCode)
Locale constructor.public static DateFormatSymbols getDateFormatSymbols(Locale locale)
DateFormatSymbols instance for specified locale.public static NumberFormat getNumberFormat(Locale locale)
NumberFormat instance for specified locale.Copyright © 2016 jetbrick. All rights reserved.