public class GenericComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.Object>
When dealing with numbers, a String representation of a number, and its
Number representation will equate, as will different Number implementations.
i.e. "1", 1 and 1D are all the same to
this Comparator, but all number representations will compare in numerical,
not alphabetical order so "10" is greater than "2".
| Constructor and Description |
|---|
GenericComparator() |
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparator<java.lang.Object>public boolean equals(java.lang.Object obj)
equals in interface java.util.Comparator<java.lang.Object>equals in class java.lang.Object