Package net.sf.saxon.sort
Class UppercaseFirstComparer
- java.lang.Object
-
- net.sf.saxon.sort.UppercaseFirstComparer
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Comparator
public class UppercaseFirstComparer extends java.lang.Object implements java.util.Comparator, java.io.SerializableA 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UppercaseFirstComparer(java.util.Comparator base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.Object a, java.lang.Object b)Compare two string objects: case is irrelevant, unless the strings are equal ignoring case, in which case uppercase comes first.
-
-
-
Method Detail
-
compare
public int compare(java.lang.Object a, java.lang.Object b)Compare two string objects: case is irrelevant, unless the strings are equal ignoring case, in which case uppercase comes first.- Specified by:
comparein interfacejava.util.Comparator- Returns:
- <0 if a0 if a>b
- Throws:
java.lang.ClassCastException- if the objects do not implement the CharSequence interface
-
-