net.sf.saxon.sort
Class UppercaseFirstComparer
java.lang.Object
net.sf.saxon.sort.UppercaseFirstComparer
- All Implemented Interfaces:
- Serializable, Comparator
public class UppercaseFirstComparer
- extends Object
- implements Comparator, Serializable
A Comparer used for comparing keys
- Author:
- Michael H. Kay (michael.h.kay@ntlworld.com)
- See Also:
- Serialized Form
Method Summary |
int |
compare(Object a,
Object b)
Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case uppercase comes first. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UppercaseFirstComparer
public UppercaseFirstComparer(Collator base)
compare
public int compare(Object a,
Object b)
- Compare two string objects: case is irrelevant, unless the strings are equal ignoring
case, in which case uppercase comes first.
- Specified by:
compare
in interface Comparator
- Returns:
- <0 if a0 if a>b
- Throws:
ClassCastException
- if the objects do not implement the CharSequence interface