public class CaseFirstCollator extends java.lang.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,
java.lang.String collationURI)
Create a CaseFirstCollator
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
comparesEqual(java.lang.CharSequence s1,
java.lang.CharSequence s2)
Compare two strings for equality.
|
int |
compareStrings(java.lang.CharSequence a,
java.lang.CharSequence b)
Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case lowercase comes first.
|
AtomicMatchKey |
getCollationKey(java.lang.CharSequence s)
Get a collation key for two Strings.
|
java.lang.String |
getCollationURI()
Get the collation URI.
|
public CaseFirstCollator(StringCollator base, boolean upperFirst, java.lang.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 java.lang.String getCollationURI()
getCollationURI in interface StringCollatorpublic int compareStrings(java.lang.CharSequence a,
java.lang.CharSequence b)
compareStrings in interface StringCollatora - the first stringb - the second stringjava.lang.ClassCastException - if the objects are of the wrong type for this Comparerpublic boolean comparesEqual(java.lang.CharSequence s1,
java.lang.CharSequence s2)
comparesEqual in interface StringCollators1 - the first strings2 - the second stringpublic AtomicMatchKey getCollationKey(java.lang.CharSequence s)
getCollationKey in interface StringCollators - Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.