我想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
慕的地8271018
慕尼黑5688855
当年话下
慕尼黑的夜晚无繁华
随时随地看视频慕课网APP
相关分类