public class CaseFirstCollator extends Object implements StringCollator, Serializable
Case is irrelevant, unless the strings are equal ignoring case, in which case lowercase comes first.
| Constructor and Description |
|---|
CaseFirstCollator(StringCollator base,
boolean upperFirst)
Create a CaseFirstCollator
|
| 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 lowercase comes first.
|
Object |
getCollationKey(String s)
Get a collation key for two Strings.
|
public CaseFirstCollator(StringCollator base, boolean upperFirst)
base - the base collator, which determines how characters are sorted irrespective of caseupperFirst - true if uppercase precedes lowercase, false otherwisepublic int compareStrings(String a, String b)
compareStrings in interface StringCollatora - the first stringb - the second stringClassCastException - if the objects are of the wrong type for this Comparerpublic boolean comparesEqual(String s1, String s2)
comparesEqual in interface StringCollators1 - the first strings2 - the second stringpublic Object getCollationKey(String s)
getCollationKey in interface StringCollators - the string whose collation key is requiredCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.