1 package net.sourceforge.queried;
2
3 import java.util.Comparator;
4
5 public class KillsComparator implements Comparator {
6
7 public KillsComparator() {
8 }
9
10 public int compare(Object obj1, Object obj2) {
11 PlayerInfo playerInfo1 = (PlayerInfo) obj1;
12 PlayerInfo playerInfo2 = (PlayerInfo) obj2;
13
14 if(playerInfo1.getKills() < playerInfo2.getKills()) {
15 return 1;
16 }
17
18 return playerInfo1.getKills() <= playerInfo2.getKills() ? 0 : -1;
19 }
20 }