Package net.ssehub.easy.basics
Class DefaultLocale
- java.lang.Object
-
- net.ssehub.easy.basics.DefaultLocale
-
public class DefaultLocale extends java.lang.ObjectProvides access to the default locale.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.LocaledefaultLocalestatic java.util.LocaleINITIAL_LOCALE
-
Constructor Summary
Constructors Constructor Description DefaultLocale()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.LocalegetDefaultLocale()Returns the default locale for evaluation.static voidsetDefaultLocale(java.util.Locale locale)Changes the default locale for evaluation.static java.util.LocaletoLocale(java.lang.String loc)Turnslocinto a locale.static java.lang.StringtoString(java.util.Locale locale)Turns the locale into a string.
-
-
-
Method Detail
-
setDefaultLocale
public static void setDefaultLocale(java.util.Locale locale)
Changes the default locale for evaluation.- Parameters:
locale- the new locale, ignored if null
-
getDefaultLocale
public static java.util.Locale getDefaultLocale()
Returns the default locale for evaluation.- Returns:
- the locale
-
toString
public static java.lang.String toString(java.util.Locale locale)
Turns the locale into a string.- Parameters:
locale- the locale- Returns:
- the locale as string
-
toLocale
public static java.util.Locale toLocale(java.lang.String loc)
Turnslocinto a locale.- Parameters:
loc- a string specifying a locale (form: lang[_country]).- Returns:
- the locale
-
-