net.sf.saxon.sort
public class TextComparer extends Object implements Comparator, Serializable
Constructor Summary | |
---|---|
TextComparer(Comparator collator) |
Method Summary | |
---|---|
int | compare(Object a, Object b)
Compare two Items by converting them to strings and comparing the string values. |
Parameters: a the first Item to be compared. b the second Item to be compared.
Returns: <0 if a0 if a>b
Throws: ClassCastException if the objects are not Items, or are items that cannot be convered to strings (e.g. QNames)