pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.util
Class LocaleUtils.LocaleComparator

java.lang.Object
  extended by org.torweg.pulse.util.LocaleUtils.LocaleComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator<java.util.Locale>
Enclosing class:
LocaleUtils

public static final class LocaleUtils.LocaleComparator
extends java.lang.Object
implements java.util.Comparator<java.util.Locale>, java.io.Serializable

Comparator comparing locales by their String representations.

Author:
Thomas Weber
See Also:
Serialized Form

Constructor Summary
LocaleUtils.LocaleComparator()
           
 
Method Summary
 int compare(java.util.Locale arg0, java.util.Locale arg1)
          compares the given locales by their String representations.
 
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
 

Constructor Detail

LocaleUtils.LocaleComparator

public LocaleUtils.LocaleComparator()
Method Detail

compare

public int compare(java.util.Locale arg0,
                   java.util.Locale arg1)
compares the given locales by their String representations.

Specified by:
compare in interface java.util.Comparator<java.util.Locale>
Parameters:
arg0 - the first locale in the comparison
arg1 - the second locale in the comparison
Returns:
0 (zero) if the strings are equal; compareTo returns 0 (zero) exactly when the Object.equals(Object) method would return true.