Created
March 9, 2017 16:04
-
-
Save kornysietsma/51feb6dbafcb4abf872e9f05fbb5cfde to your computer and use it in GitHub Desktop.
Java 8 snippets
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
// turn a stream into a group | |
Map<String, Long> counting = items.stream().collect( | |
Collectors.groupingBy(Item::getName, Collectors.counting())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment