public class UppercaseFirstCollator extends Object implements StringCollator, Serializable
Constructor and Description |
---|
UppercaseFirstCollator(StringCollator base)
Create an UppercaseFirstCollator
|
Modifier and Type | Method and Description |
---|---|
boolean |
comparesEqual(String s1,
String s2)
Compare two strings for equality.
|
int |
compareStrings(String a,
String b)
Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case uppercase comes first.
|
Object |
getCollationKey(String s)
Get a collation key for two Strings.
|
public UppercaseFirstCollator(StringCollator base)
base
- the base collator used to compare strings irrespective of casepublic int compareStrings(String a, String b)
compareStrings
in interface StringCollator
a
- the first stringb
- the second stringClassCastException
- if the objects do not implement the CharSequence interfacepublic boolean comparesEqual(String s1, String s2)
comparesEqual
in interface StringCollator
s1
- the first strings2
- the second stringpublic Object getCollationKey(String s)
getCollationKey
in interface StringCollator
s
- the string whose collation key is required