Tip: Java 8 Streams flatmap map lists

A little example, I had to develop as a teaching use case, of how to take a map with Integer keys and values with a List as value and find a specific value in any List in the whole map using Java Streams.

boolean b1 returns true because the element exists
boolean b2 is the response to an element that doesn’t exist

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Bad Behavior has blocked 154 access attempts in the last 7 days.

Hyper Smash