java.io.Serializable
, java.util.Comparator
public class NumericComparer
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable
Modifier and Type | Method | Description |
---|---|---|
int |
compare(java.lang.Object a,
java.lang.Object b) |
Compare two Items by converting them to numbers and comparing the numeric values.
|
static NumericComparer |
getInstance() |
public static NumericComparer getInstance()
public int compare(java.lang.Object a, java.lang.Object b)
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