java8 groupby count

Map<String, Long> map = msgList.stream().collect(Collectors.groupingBy(Message::getFromAccount, Collectors.counting()));
posted @ 2020-12-07 19:11  君子笑而不语  阅读(2896)  评论(0编辑  收藏  举报