/ Compare two objects to each other. This function is necessary because there's no super class that implements compareTo. This function provides an (arbitrary) ordering of objects of different types as follows: NULL < BOOLEAN < BYTE < INTEGER < LONG < FLOAT < DOUBLE < DATET
(Object o1, Object o2)
| 458 | * @return -1 if o1 is less, 0 if they are equal, 1 if o2 is less. |
| 459 | */ |
| 460 | public static int compare(Object o1, Object o2) { |
| 461 | |
| 462 | byte dt1 = findType(o1); |
| 463 | byte dt2 = findType(o2); |
| 464 | return compare(o1, o2, dt1, dt2); |
| 465 | } |
| 466 | |
| 467 | /** |
| 468 | * Same as {@link #compare(Object, Object)}, but does not use reflection to determine the type |