lambd表达式reduce的应用

来源:互联网 发布:怎么样做淘宝生意 编辑:程序博客网 时间:2024/06/06 01:35

keyCounts.stream().map(x -> x.getValue()).reduce((y, x) -> y + "," + x).get();

map.get(i + "").stream().map(x -> x.getScore()).reduce((y, x) -> y + x).get();

value.stream().map(x -> x.getScore()).reduce((x, y) -> (x + y) / size).get();


原创粉丝点击