org.opencms.i18n
Class CmsLocaleComparator

java.lang.Object
  extended by org.opencms.i18n.CmsLocaleComparator
All Implemented Interfaces:
Comparator

public final class CmsLocaleComparator
extends Object
implements Comparator

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

Since:
6.0.0
Version:
$Revision: 1.7 $
Author:
Alexander Kandzior

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

Returns:
a static instance of the locale comparator

compare

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