Class I18nComparator

  • All Implemented Interfaces:
    Comparator<String>

    public class I18nComparator
    extends Object
    implements Comparator<String>
    This comparator can compare strings using a collator for a specified locale. The collator has primary strength, which means that diacritics and case are ignored.
    • Constructor Detail

      • I18nComparator

        public I18nComparator()
        Constructs a new comparator with the default locale.
      • I18nComparator

        public I18nComparator​(Locale locale)
        Constructs a new comparator with the specified locale. If the locale is null, it will use the default locale.
        Parameters:
        locale - the locale or null