我想List<E>从一个Map<String,List<E>>(E是一个随机类)中提取一个stream().
我想要一个使用java 8流的简单单行方法.
我到现在为止尝试过的事情:
HashMap<String,List<E>> map = new HashMap<>();
List<E> list = map.values(); // does not compile
list = map.values().stream().collect(Collectors.toList()); // does not compile
Run Code Online (Sandbox Code Playgroud)