Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save farnulfo/60698194b16949f56f7811741cff9856 to your computer and use it in GitHub Desktop.
Save farnulfo/60698194b16949f56f7811741cff9856 to your computer and use it in GitHub Desktop.
LocalDate now = LocalDate.now();
persons.stream()
.filter(Person::isMale)
.filter(p -> p.isAdult(now)
.map(p -> p.getFirstName() + " " + p.getLastName())
.collect(Collectors.toList());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment