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