com.atlassian.crowd.openid.server.util
Class LocalComparator

java.lang.Object
  extended by com.atlassian.crowd.openid.server.util.LocalComparator
All Implemented Interfaces:
Comparator

public class LocalComparator
extends Object
implements Comparator

Compares two Locales based on their displayLanguage or their displayCountry. Useful for alphabetically sorting a list of Locales.


Field Summary
static int DISPLAY_COUNTRY
           
static int DISPLAY_LANGUAGE
           
 
Constructor Summary
LocalComparator()
           
 
Method Summary
 int compare(Object o1, Object o2)
           
 int getComparatorField()
           
 void setComparatorField(int comparatorField)
           
 
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
 

Field Detail

DISPLAY_LANGUAGE

public static final int DISPLAY_LANGUAGE
See Also:
Constant Field Values

DISPLAY_COUNTRY

public static final int DISPLAY_COUNTRY
See Also:
Constant Field Values
Constructor Detail

LocalComparator

public LocalComparator()
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator

getComparatorField

public int getComparatorField()

setComparatorField

public void setComparatorField(int comparatorField)


Copyright © 2013 Atlassian. All Rights Reserved.