public class CaseInsensitiveOrder extends Object implements Comparator<String>
| Constructor and Description |
|---|
CaseInsensitiveOrder() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(String s1,
String s2)
Compares the two specified objects to determine their relative ordering.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic int compare(String s1, String s2)
(object1, object2) should form an equivalence relation.
This means that
compare(a,a) returns zero for all acompare(a,b) must be the opposite of the sign of compare(b,a) for all pairs of (a,b)compare(a,b) > 0 and compare(b,c) > 0 it must
follow compare(a,c) > 0 for all possible combinations of (a,b,c)compare in interface Comparator<String>s1 - an Object.s2 - a second Object to compare with object1.object1 is less than object2, 0 if they are
equal, and > 0 if object1 is greater than object2.