| java.lang.Object com.jidesoft.comparator.NumberComparator
NumberComparator | public class NumberComparator implements Comparator(Code) | | Comparator for Number type. This is a singleton class. Call getInstance() to
get the comparator.
|
Constructor Summary | |
protected | NumberComparator() Constructor.
Has protected access to prevent other clients creating instances of the
class ... |
NumberComparator | protected NumberComparator()(Code) | | Constructor.
Has protected access to prevent other clients creating instances of the
class ... it is stateless so we need only one instance.
|
compare | public int compare(Object o1, Object o2)(Code) | | Compares two Numbers.
Parameters: o1 - the first object to be compared Parameters: o2 - the second object to be compared 0 if a and b are equal, -1 if a is less than b, 1 if a is more than b. |
getInstance | public static NumberComparator getInstance()(Code) | | Returns NumberComparator singleton.
an instance of NumberComparator. |
|
|