public class TextComparer extends Object implements Comparator, Serializable
| Constructor and Description |
|---|
TextComparer(Comparator collator) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Object a,
Object b)
Compare two Items by converting them to strings and comparing the string values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic TextComparer(Comparator collator)
public int compare(Object a, Object b) throws ClassCastException
compare in interface Comparatora - the first Item to be compared.b - the second Item to be compared.ClassCastException - if the objects are not Items, or are items that cannot be convered
to strings (e.g. QNames)