Interface XLocaleUtils.LocaleMatcher

All Superinterfaces:
Predicate<Locale>
Enclosing class:
XLocaleUtils

public static interface XLocaleUtils.LocaleMatcher extends Predicate<Locale>
A predicate on a locale.
Since:
8.2.0
  • Method Details

    • localeMatchBaseLanguage

      static XLocaleUtils.LocaleMatcher localeMatchBaseLanguage(Locale locale)
      Gets a locale matcher that matches when a locale has the same base language as the given locale. Passing null will return a matcher that always returns false.
      Parameters:
      locale - The locale against which to compare.
      Returns:
      The locale matcher.
    • localeMatchExact

      static XLocaleUtils.LocaleMatcher localeMatchExact(Locale locale)
      Gets a locale matcher that matches when a locale is exactly equal to the given locale. Passing null will return a matcher that never matches.
      Parameters:
      locale - The locale against which to compare.
      Returns:
      The locale matcher.