anonym -> lambda

This commit is contained in:
Anna.Kozlova
2016-05-18 11:57:04 +02:00
parent 52b31bf325
commit ffd54ff4f4
4 changed files with 29 additions and 41 deletions

View File

@@ -191,11 +191,7 @@ public class DomHelper {
lstPosts.add(stt.id);
}
Collections.sort(lstPosts, new Comparator<Integer>() {
public int compare(Integer o1, Integer o2) {
return mapSortOrder.get(o1).compareTo(mapSortOrder.get(o2));
}
});
Collections.sort(lstPosts, (o1, o2) -> mapSortOrder.get(o1).compareTo(mapSortOrder.get(o2)));
if (lstPosts.size() > 1 && lstPosts.get(0).intValue() == st.id) {
lstPosts.add(lstPosts.remove(0));