You can use flatMap . It was used to combine several threads into one. Therefore, here you need to create a stream of collections, and then create a stream from each of them:
processeditemList.values().stream()
.map(Map::keySet)
.flatMap(Set::stream)
.collect(toList());
If you want to change the default implementation of the list, you can use below the collector:
Collectors.toCollection(LinkedList::new)
A LinkedList would be nice if you don't know the final size of the list, and you do more insert operations than you think.
ArrayList oposite: /. ArrayList , , .