|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.databene.commons.LocaleUtil
public final class LocaleUtil
Provides locale operations like determining the parent of a locale,
finding a locale by code, providing the characters of a locale
and a so-called 'fallback locale'.
Created: 26.09.2006 23:34:41
| Constructor Summary | |
|---|---|
LocaleUtil()
|
|
| Method Summary | ||
|---|---|---|
static java.lang.String |
availableLocaleUrl(java.lang.String baseName,
java.util.Locale locale,
java.lang.String suffix)
|
|
static
|
callInLocale(java.util.Locale locale,
java.util.concurrent.Callable<T> task)
|
|
static java.lang.String |
getDefaultCountryCode()
|
|
static java.util.Locale |
getFallbackLocale()
Returns the fallback locale. |
|
static java.util.Locale |
getLocale(java.lang.String code)
Maps the locale code to a locale, e.g. de_DE to Locale.GERMANY. |
|
static java.util.Locale |
language(java.util.Locale locale)
|
|
static java.util.Set<java.lang.Character> |
letters(java.util.Locale locale)
Returns a set that contains all letters of the specified locale. |
|
static java.util.Locale |
parent(java.util.Locale locale)
Determines a locale's parent, e.g. for a locale 'de_DE' it returns 'de'. |
|
static void |
runInLocale(java.util.Locale locale,
java.lang.Runnable task)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocaleUtil()
| Method Detail |
|---|
public static java.util.Set<java.lang.Character> letters(java.util.Locale locale)
locale - the locale of which the character set is requested
java.lang.UnsupportedOperationException - if the locale is not supportedpublic static java.util.Locale parent(java.util.Locale locale)
locale - the locale of which to determine the parent
public static java.util.Locale getFallbackLocale()
public static java.util.Locale getLocale(java.lang.String code)
code - the locale colde to map
public static java.lang.String availableLocaleUrl(java.lang.String baseName,
java.util.Locale locale,
java.lang.String suffix)
public static java.lang.String getDefaultCountryCode()
public static java.util.Locale language(java.util.Locale locale)
public static void runInLocale(java.util.Locale locale,
java.lang.Runnable task)
public static <T> T callInLocale(java.util.Locale locale,
java.util.concurrent.Callable<T> task)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||