예제 #1
0
 @Override
 public int compare(ServerType s1, ServerType s2) {
   int res = Double.compare(s1.getEfficiency(), s2.getEfficiency());
   if (res != 0) return res;
   return Integer.compare(s1.getCapacity(), s2.getCapacity()); // TODO reverse?
 }
예제 #2
0
 @Override
 public int compare(ServerType s1, ServerType s2) {
   return Integer.compare(s1.getCapacity(), s2.getCapacity());
 }