分组
List<MjConfig> mjConfigs = new ArrayList<>();
// 根据Type类型分组
Map<String, List<MjConfig>> map = mjConfigs.stream().collect(Collectors.groupingBy(MjConfig::getType));
提取元素属性
List<User> list = new ArrayList<>();
List<String> names = list.stream().map(User::getName).distinct().collect(Collectors.toList());