Class CaseInsensitiveOrder
java.lang.Object
com.codename1.util.CaseInsensitiveOrder
- All Implemented Interfaces:
Comparator<String>
A string comparator equivalent to String.CASE_INSENSITIVE_ORDER which isn't available in Codename One
-
Constructor Details
-
CaseInsensitiveOrder
public CaseInsensitiveOrder()
-
-
Method Details
-
compare
Compares the two specified objects to determine their relative ordering. The ordering implied by the return value of this method for all possible pairs of(object1, object2)should form an equivalence relation. This means thatcompare(a,a)returns zero for alla- the sign of
compare(a,b)must be the opposite of the sign ofcompare(b,a)for all pairs of (a,b) - From
compare(a,b) > 0andcompare(b,c) > 0it must followcompare(a,c) > 0for all possible combinations of(a,b,c)
- Specified by:
comparein interfaceComparator<String>- Parameters:
s1- anObject.s2- a secondObjectto compare withobject1.- Returns:
- an integer invalid input: '<' 0 if
object1is less thanobject2, 0 if they are equal, and > 0 ifobject1is greater thanobject2.
-