Beispiel #1
0
 public int compare(Run record, String key) {
   try {
     int k = Integer.parseInt(key);
     return record.getNumber() - k;
   } catch (NumberFormatException nfe) {
     return String.valueOf(record.getNumber()).compareTo(key);
   }
 }
Beispiel #2
0
 public String getKey(Run record) {
   return String.valueOf(record.getNumber());
 }