Class CmsLocaleComparator

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Comparator<java.util.Locale>

    public final class CmsLocaleComparator
    extends java.lang.Object
    implements java.io.Serializable, java.util.Comparator<java.util.Locale>
    Simple comparator implementation for locales, that compares the String value of the locales.

    Since:
    6.0.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.util.Locale o1, java.util.Locale o2)  
      static java.util.Comparator<java.util.Locale> getComparator()
      Returns a static instance of the locale comparator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Method Detail

      • getComparator

        public static java.util.Comparator<java.util.Locale> getComparator()
        Returns a static instance of the locale comparator.

        Returns:
        a static instance of the locale comparator
      • compare

        public int compare​(java.util.Locale o1,
                           java.util.Locale o2)
        Specified by:
        compare in interface java.util.Comparator<java.util.Locale>
        See Also:
        Comparator.compare(java.lang.Object, java.lang.Object)