Public Member Functions | |
int | compare (Object o1, Object o2) |
This class is needed for reverse sorting.
int game.Score.EntryComparator.compare | ( | Object | o1, | |
Object | o2 | |||
) |
References game.Score.Entry.compareTo().
00145 { 00146 if ((o1 instanceof Entry) && (o2 instanceof Entry)) { 00147 Entry entry1 = (Entry) o1; 00148 Entry entry2 = (Entry) o2; 00149 return -entry1.compareTo(entry2); 00150 } 00151 System.out.println("Error in comparator" + this.getClass()); 00152 return 0; 00153 }