* this way but other subclasses of Number might want to do this to save
* space and avoid unnecessary heap allocation.
*/
if (type == LogLevel.class) {
LogLevel n1 = (LogLevel) data.getValueAt(row1, column);
double d1 = n1.getLevel();
LogLevel n2 = (LogLevel) data.getValueAt(row2, column);
double d2 = n2.getLevel();
if (d1 < d2) {
return 1;
} else if (d1 > d2) {
return -1;
} else {
return 0;
}
} else if (type.getSuperclass() == java.lang.Number.class) {
Number n1 = (Number) data.getValueAt(row1, column);
double d1 = n1.doubleValue();
Number n2 = (Number) data.getValueAt(row2, column);
double d2 = n2.doubleValue();
if (d1 < d2) {
return -1;
} else if (d1 > d2) {
return 1;