net.sf.saxon.sort
Class CodepointCollator
java.lang.Object
net.sf.saxon.sort.CodepointCollator
- All Implemented Interfaces:
- java.util.Comparator, java.io.Serializable
- public class CodepointCollator
- extends java.lang.Object
- implements java.util.Comparator, java.io.Serializable
A collating sequence that uses Unicode codepoint ordering
- See Also:
- Serialized Form
Method Summary |
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two string objects. |
int |
compareCS(java.lang.CharSequence a,
java.lang.CharSequence b)
Compare two CharSequence objects. |
static CodepointCollator |
getInstance()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
CodepointCollator
public CodepointCollator()
getInstance
public static CodepointCollator getInstance()
compare
public int compare(java.lang.Object a,
java.lang.Object b)
- Compare two string objects.
- Specified by:
compare
in interface java.util.Comparator
- Returns:
- <0 if a0 if a>b
- Throws:
java.lang.ClassCastException
- if the objects are of the wrong type for this Comparer
compareCS
public int compareCS(java.lang.CharSequence a,
java.lang.CharSequence b)
- Compare two CharSequence objects. This is hand-coded to avoid converting the objects into
Strings.
- Returns:
- <0 if a0 if a>b
- Throws:
java.lang.ClassCastException
- if the objects are of the wrong type for this Comparer