Map<Integer, List<Entity>> groupBy
= entityList.stream()
.collect(Collectors.groupingBy(Entity::getGrouper));
Map<Integer, Entity> entityMap
= entityList.stream()
.collect(Collectors.toMap(Entity::getKey, entity -> entity));
文章知识点与官方知识档案匹配,可进一步学习相关知识