Class DefaultLocale

java.lang.Object
net.ssehub.easy.basics.DefaultLocale

public class DefaultLocale extends Object
Provides access to the default locale.
Author:
Holger Eichelberger
  • Field Details

    • INITIAL_LOCALE

      public static final Locale INITIAL_LOCALE
    • defaultLocale

      private static Locale defaultLocale
  • Constructor Details

    • DefaultLocale

      public DefaultLocale()
  • Method Details

    • setDefaultLocale

      public static void setDefaultLocale(Locale locale)
      Changes the default locale for evaluation.
      Parameters:
      locale - the new locale, ignored if null
    • getDefaultLocale

      public static Locale getDefaultLocale()
      Returns the default locale for evaluation.
      Returns:
      the locale
    • toString

      public static String toString(Locale locale)
      Turns the locale into a string.
      Parameters:
      locale - the locale
      Returns:
      the locale as string
    • toLocale

      public static Locale toLocale(String loc)
      Turns loc into a locale.
      Parameters:
      loc - a string specifying a locale (form: lang[_country]).
      Returns:
      the locale