com.sibvisions.util.type
Class LocaleUtil

java.lang.Object
  extended by com.sibvisions.util.type.LocaleUtil

public final class LocaleUtil
extends Object

The DateUtil is a utility class for date conversion and for formatting dates as string.


Method Summary
static Locale forLanguageTag(String pLanguageTag)
          Get a locale parsing language, country and variant.
static Locale getDefault()
          Gets the default locale.
static String getListSeparator()
          Gets the list separator for the current locale.
static String getListSeparator(Locale pLocale)
          Gets the list separator for the given locale.
static void setDefault(Locale pLocale)
          Gets the default locale.
static void setThreadDefault(Locale pLocale)
          Gets the default locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forLanguageTag

public static Locale forLanguageTag(String pLanguageTag)
Get a locale parsing language, country and variant.

Parameters:
pLanguageTag - the language tag.
Returns:
the Locale.

getDefault

public static Locale getDefault()
Gets the default locale. If no locale is set, the default local is returned.

Returns:
the default locale.

setDefault

public static void setDefault(Locale pLocale)
Gets the default locale. If no locale is set, the default local is returned.

Parameters:
pLocale - the default locale.

setThreadDefault

public static void setThreadDefault(Locale pLocale)
Gets the default locale. If no locale is set, the default local is returned.

Parameters:
pLocale - the default locale.

getListSeparator

public static String getListSeparator()
Gets the list separator for the current locale.

Returns:
the list separator e.g. ; in Europe or , in US
See Also:
getListSeparator(Locale)

getListSeparator

public static String getListSeparator(Locale pLocale)
Gets the list separator for the given locale.

Parameters:
pLocale - the locale to use
Returns:
the list separator e.g. ; in Europe or , in US


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.