mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Replacing with Lists.sort for better performance
This commit is contained in:
@@ -151,7 +151,7 @@ public final class SItemManagerUtil {
|
|||||||
for (final Entry<InventoryItem, Integer> itemEntry : items) {
|
for (final Entry<InventoryItem, Integer> itemEntry : items) {
|
||||||
sorted.add(itemEntry);
|
sorted.add(itemEntry);
|
||||||
}
|
}
|
||||||
Collections.sort(sorted, new Comparator<Entry<InventoryItem, Integer>>() {
|
sorted.sort(new Comparator<Entry<InventoryItem, Integer>>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(final Entry<InventoryItem, Integer> x, final Entry<InventoryItem, Integer> y) {
|
public int compare(final Entry<InventoryItem, Integer> x, final Entry<InventoryItem, Integer> y) {
|
||||||
return x.getKey().toString().compareTo(y.getKey().toString());
|
return x.getKey().toString().compareTo(y.getKey().toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user