1. List is grouped and counted

    List<UserInfo> userList = Lists.newArrayList();
         Map<String, Long> collect = userList.stream()
                 .collect(Collectors.groupingBy(UserInfo::getId, Collectors.counting()));
  2. After sorting, take topN
List<InfoVo> collect = InfoVos.stream()
                .sorted(Comparator.comparing(InfoVo::getUserType).thenComparing(InfoVo::getItime))
                .limit(3)
                .collect(Collectors.toList());