public class AlphanumericCollator extends java.lang.Object implements StringCollator, java.io.Serializable
Note: this StringCollator produces an ordering that is not compatible with equals().
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
AlphanumericCollator(StringCollator base)
Create an alphanumeric collation
|
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 cs1,
java.lang.CharSequence cs2)
Compare two objects.
|
AtomicMatchKey |
getCollationKey(java.lang.CharSequence cs)
Get a collation key for comparing two Strings.
|
java.lang.String |
getCollationURI()
Get the collation URI.
|
public static final java.lang.String PREFIX
public AlphanumericCollator(StringCollator base)
base
- the collation used to compare the alphabetic parts of the stringpublic java.lang.String getCollationURI()
getCollationURI
in interface StringCollator
public int compareStrings(java.lang.CharSequence cs1, java.lang.CharSequence cs2)
compareStrings
in interface StringCollator
cs1
- the first stringcs2
- the second stringpublic boolean comparesEqual(java.lang.CharSequence s1, java.lang.CharSequence s2)
comparesEqual
in interface StringCollator
s1
- the first strings2
- the second stringpublic AtomicMatchKey getCollationKey(java.lang.CharSequence cs)
getCollationKey
in interface StringCollator
cs
- the string whose collation key is requiredCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.