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

@ -321,7 +321,7 @@
}
}
// sort the cards
cardsToLayout.sort((cp1, cp2) -> Integer.valueOf(cp1.getLocation().x).compareTo(cp2.getLocation().x));
cardsToLayout.sort(Comparator.comparingInt(cp -> cp.getLocation().x));
// relocate the cards
int dx = 0;
for (Component component : cardsToLayout) {