org.opencms.i18n
Class CmsLocaleComparator

java.lang.Object
  extended by org.opencms.i18n.CmsLocaleComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public final class CmsLocaleComparator
extends java.lang.Object
implements java.io.Serializable, java.util.Comparator

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

Since:
6.0.0
Version:
$Revision: 1.12 $
Author:
Alexander Kandzior
See Also:
Serialized Form

Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
static java.util.Comparator 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 java.util.Comparator getComparator()
Returns a static instance of the locale comparator.

Returns:
a static instance of the locale comparator

compare

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