public class NumericComparer extends Object implements Comparator, Serializable
Constructor and Description |
---|
NumericComparer() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object a,
Object b)
Compare two Items by converting them to numbers and comparing the numeric values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(Object a, Object b)
compare
in interface Comparator
a
- the first Item to be compared.b
- the second Item to be compared.ClassCastException
- if the objects are not Items