Class MessageService


  • public class MessageService
    extends Object
    • Method Detail

      • isLocaleSupported

        public static boolean isLocaleSupported​(Locale locale)
      • getSupportedLocale

        public static Locale getSupportedLocale​(List<Locale> locales)
        Return first found supported Locale (iterating over list starting with first element). If no Locale is supported NULL is returned.
        Parameters:
        locales -
        Returns:
        first supported Locale or NULL.
      • getSupportedLocale

        public static Locale getSupportedLocale​(List<Locale> locales,
                                                Locale defaultLocale)
        Return first found supported Locale (iterating over list starting with first element). If no Locale is supported given defaultLocale is returned.
        Parameters:
        locales - to be checked locales
        defaultLocale - local which is returned if no supported local is in given locales list
        Returns:
        first supported Locale or given defaultLocale.
      • getLocale

        public Locale getLocale()