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 Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.Methods inherited from interface Comparator
equals
-
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.
-