【发布时间】:2018-09-16 05:23:21
【问题描述】:
我有一个数据结构 - ArrayList> 这就是我需要做的 -
ArrayList<HashMap<String, String>> optMapList;
//populated optMapList with some code. Not to worry abt this
List<String> values = new ArrayList<String>();
for(HashMap<String,String> entry: optMapList){
values.add(entry.get("optValue"));
}
我们如何使用 Java Streams 来实现相同的目标?
【问题讨论】:
标签: java hashmap java-stream