com.sibvisions.util.type
Class LocaleUtil

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

public final class LocaleUtil
extends java.lang.Object

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


Method Summary
static java.util.Locale forLanguageTag(java.lang.String pLanguageTag)
          Get a locale parsing language, country and variant.
static java.util.Locale getDefault()
          Gets the default locale.
static java.lang.String getListSeparator()
          Gets the list separator for the current locale.
static java.lang.String getListSeparator(java.util.Locale pLocale)
          Gets the list separator for the given locale.
static void setDefault(java.util.Locale pLocale)
          Gets the default locale.
static void setThreadDefault(java.util.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 java.util.Locale forLanguageTag(java.lang.String pLanguageTag)
Get a locale parsing language, country and variant.

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

getDefault

public static java.util.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(java.util.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(java.util.Locale pLocale)
Gets the default locale. If no locale is set, the default local is returned.

Parameters:
pLocale - the default locale.

getListSeparator

public static java.lang.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 java.lang.String getListSeparator(java.util.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.