list的相同数据合成map并计数

 1 Map<Integer, Long> articleSubTypeDisplayNameMap = articleSubTypeList.stream().collect(Collectors.groupingBy(p -> p, Collectors.counting())); 
posted @ 2022-08-02 09:21  酷盖的小机灵  阅读(226)  评论(0编辑  收藏  举报