Created
July 18, 2020 20:49
-
-
Save theboreddev/b820c19a87e372131b3b5898499bd8cc to your computer and use it in GitHub Desktop.
employeesOverThirtyBySex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Map<Employee.Sex, List<Employee>> employeesOverThirtyBySex = employees.stream() | |
.collect(groupingBy(Employee::getSex, filtering(employee -> employee.getAge() > 30, toList()))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment