Class UppercaseFirstComparer
java.lang.Object
net.sf.saxon.sort.UppercaseFirstComparer
- All Implemented Interfaces:
Serializable, Comparator
A Comparer used for comparing strings, with upper case collated before lower case
if the strings are otherwise equal. This is implemented as a wrapper around a collator
that compares the strings ignoring case.
- Author:
- Michael H. Kay
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
UppercaseFirstComparer
-
-
Method Details
-
compare
Compare two string objects: case is irrelevant, unless the strings are equal ignoring case, in which case uppercase comes first.- Specified by:
comparein interfaceComparator- Returns:
- invalid input: '<'0 if ainvalid input: '<'b, 0 if a=b, >0 if a>b
- Throws:
ClassCastException- if the objects do not implement the CharSequence interface
-