Skip to content

Instantly share code, notes, and snippets.

@hasalex
Created September 24, 2017 17:00
Show Gist options
  • Select an option

  • Save hasalex/1b4e94a47f1dce6ae1b7c97bda34b824 to your computer and use it in GitHub Desktop.

Select an option

Save hasalex/1b4e94a47f1dce6ae1b7c97bda34b824 to your computer and use it in GitHub Desktop.

Revisions

  1. hasalex created this gist Sep 24, 2017.
    5 changes: 5 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    persons.stream()
    .filter(Person::isMale)
    .filter(p -> p.isAdult(LocalDate.now()))
    .map(p -> p.getFirstName() + " " + p.getLastName())
    .collect(Collectors.toList());