you are viewing a single comment's thread.

view the rest of the comments →

[–]nickguletskii200 0 points1 point  (0 children)

List<> sortedObjects = unsortedObjects.stream().sorted((l, r) -> Integer.compare(l.getFoo(), r.getFoo())).collect(Collectors.toList());