forked from External/mage
comparation simplified
This commit is contained in:
parent
022c1407ed
commit
7da043afd0
6 changed files with 12 additions and 18 deletions
|
|
@ -57,13 +57,10 @@ public class PickChoiceDialog extends MageDialog {
|
|||
|
||||
// sorting
|
||||
if (choice.isSortEnabled()) {
|
||||
Collections.sort(this.allItems, new Comparator<KeyValueItem>() {
|
||||
@Override
|
||||
public int compare(KeyValueItem o1, KeyValueItem o2) {
|
||||
Integer n1 = choice.getSortData().get(o1.Key);
|
||||
Integer n2 = choice.getSortData().get(o2.Key);
|
||||
return n1.compareTo(n2);
|
||||
}
|
||||
this.allItems.sort((o1, o2) -> {
|
||||
Integer n1 = choice.getSortData().get(o1.Key);
|
||||
Integer n2 = choice.getSortData().get(o2.Key);
|
||||
return n1.compareTo(n2);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue