org.opencms.i18n
Class CmsLocaleComparator

java.lang.Object
  extended by org.opencms.i18n.CmsLocaleComparator
All Implemented Interfaces:
Serializable, Comparator<Locale>

public final class CmsLocaleComparator
extends Object
implements Serializable, Comparator<Locale>

Simple comparator implementation for locales, that compares the String value of the locales.

Since:
6.0.0
See Also:
Serialized Form

Method Summary
 int compare(Locale o1, Locale o2)
           
static Comparator<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
 

Method Detail

getComparator

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

Returns:
a static instance of the locale comparator

compare

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