java小技巧(四)--利用lambada 对list进行分组汇总
摘要:
对一个List进行分组汇总的lambada写法: list.stream().collect(Collectors.groupingBy(TestDTO::getId, Collectors.summarizingInt(TestDTO::getValue))); 上面TestDTO::getVal 阅读全文
posted @ 2022-08-17 11:14 小夏coding 阅读(5235) 评论(0) 推荐(0) 编辑