cleanup: prefer List#sort over Collections#sort
This commit is contained in:
@@ -211,7 +211,7 @@ public class MapleParty {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
Collections.sort(histList, (o1, o2) -> (o1.getValue()).compareTo(o2.getValue()));
|
||||
histList.sort((o1, o2) -> (o1.getValue()).compareTo(o2.getValue()));
|
||||
|
||||
List<Integer> histSort = new LinkedList<>();
|
||||
for (Entry<Integer, Integer> e : histList) {
|
||||
|
||||
@@ -461,7 +461,7 @@ public class World {
|
||||
list.add(e);
|
||||
}
|
||||
|
||||
Collections.sort(list, (o1, o2) -> o1.getKey() - o2.getKey());
|
||||
list.sort((o1, o2) -> o1.getKey() - o2.getKey());
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@ public class World {
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(hmsAvailable, (p1, p2) -> p1.getLeft().getPrice() - p2.getLeft().getPrice());
|
||||
hmsAvailable.sort((p1, p2) -> p1.getLeft().getPrice() - p2.getLeft().getPrice());
|
||||
|
||||
hmsAvailable.subList(0, Math.min(hmsAvailable.size(), 200)); //truncates the list to have up to 200 elements
|
||||
return hmsAvailable;
|
||||
|
||||
Reference in New Issue
Block a user