comparation simplified

This commit is contained in:
vyacheslav.raskulin 2020-09-09 15:00:30 +03:00
parent 022c1407ed
commit 7da043afd0
6 changed files with 12 additions and 18 deletions

View file

@ -96,13 +96,10 @@ public class PickCheckBoxDialog 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.getKey());
Integer n2 = choice.getSortData().get(o2.getKey());
return n1.compareTo(n2);
}
this.allItems.sort((o1, o2) -> {
Integer n1 = choice.getSortData().get(o1.getKey());
Integer n2 = choice.getSortData().get(o2.getKey());
return n1.compareTo(n2);
});
}