public class TextComparer
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable
Constructor and Description |
---|
TextComparer(java.util.Comparator collator) |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object a,
java.lang.Object b)
Compare two Items by converting them to strings and comparing the string values.
|
public int compare(java.lang.Object a, java.lang.Object b) throws java.lang.ClassCastException
compare
in interface java.util.Comparator
a
- the first Item to be compared.b
- the second Item to be compared.java.lang.ClassCastException
- if the objects are not Items, or are items that cannot be convered
to strings (e.g. QNames)