0

how can i return only values of map with stream ? Map<String,List> -> List

is the only way list.addAll ?

map.values().stream().filter(s->s.size()>1).collect(Collectors.toList()).stream());
  • this kind of question has been asked before I think [check here](https://stackoverflow.com/questions/71047692/how-to-convert-a-mapstring-listliststring-to-mapstring-liststring) – decent boy Oct 31 '22 at 05:12
  • for more you can also check at [here](https://itnext.io/transforming-lists-into-maps-using-java-stream-api-b29ef743b440?source=post_internal_links---------2----------------------------&gi=a9f0b35ba6a1) and [here](https://javarevisited.blogspot.com/2016/04/10-examples-of-converting-list-to-map.html#axzz7jGj3hJV9). I think you should provide more code or add some example so I could know what are you trying to do – decent boy Oct 31 '22 at 05:14

0 Answers0