public class CaseFirstCollator extends Object implements StringCollator
Case is irrelevant, unless the strings are equal ignoring case, in which case lowercase comes first.
| Constructor and Description |
|---|
CaseFirstCollator(StringCollator base,
boolean upperFirst,
String collationURI)
Create a CaseFirstCollator
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
comparesEqual(CharSequence s1,
CharSequence s2)
Compare two strings for equality.
|
int |
compareStrings(CharSequence a,
CharSequence b)
Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case lowercase comes first.
|
AtomicMatchKey |
getCollationKey(CharSequence s)
Get a collation key for two Strings.
|
String |
getCollationURI()
Get the collation URI.
|
public CaseFirstCollator(StringCollator base, boolean upperFirst, String collationURI)
base - the base collator, which determines how characters are sorted irrespective of caseupperFirst - true if uppercase precedes lowercase, false otherwisecollationURI - the URI of the collationpublic String getCollationURI()
getCollationURI in interface StringCollatorpublic int compareStrings(CharSequence a, CharSequence b)
compareStrings in interface StringCollatora - the first stringb - the second stringClassCastException - if the objects are of the wrong type for this Comparerpublic boolean comparesEqual(CharSequence s1, CharSequence s2)
comparesEqual in interface StringCollators1 - the first strings2 - the second stringpublic AtomicMatchKey getCollationKey(CharSequence s)
getCollationKey in interface StringCollators - Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.