Last active
December 19, 2015 16:54
-
-
Save codeaholicguy/281328fe874e857d1fa5 to your computer and use it in GitHub Desktop.
This file contains 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
Optional<Integer> minAge = person | |
.stream() | |
.map(p -> p.getAge()) // return Stream<Integer> | |
.filter(age -> age > 20) // return Stream<Integer> | |
.min(Comparator.naturalOrder()); // terminal operation | |
people.stream() | |
.map(p -> p.getLastname()) | |
.allMatch(length < 10); // terminal operation | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment