Replacing with Lists.sort for better performance

This commit is contained in:
leriomaggio
2021-08-27 20:02:47 +01:00
parent 8f9dfea099
commit 7a7b23e593

View File

@@ -151,7 +151,7 @@ public final class SItemManagerUtil {
for (final Entry<InventoryItem, Integer> itemEntry : items) {
sorted.add(itemEntry);
}
Collections.sort(sorted, new Comparator<Entry<InventoryItem, Integer>>() {
sorted.sort(new Comparator<Entry<InventoryItem, Integer>>() {
@Override
public int compare(final Entry<InventoryItem, Integer> x, final Entry<InventoryItem, Integer> y) {
return x.getKey().toString().compareTo(y.getKey().toString());