Exemple #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);
   }
 }
Exemple #2
0
 public String getKey(Run record) {
   return String.valueOf(record.getNumber());
 }