Given a Map mapping a String to a List, is there a way to use Java Streams to return a Boolean where TRUE means one or more list had elements? If all lists in the map were e
int size = Map.entrySet().stream() .map(entry -> entry.getValue()) .flatMap(list -> list.stream()) .size(); if(size==0) return Boolean.False; else return Boolean.True;
This code is a simple one this may help for your work .