List按属性去重
List<T> distinctList= list.stream()
.collect(collectingAndThen(toCollection(
() -> new TreeSet<>(comparing(n->n.getXxx()))),ArrayList::new));
List按属性分组
Map<Long,List<T>> map = list.stream().collect(Collectors.groupingBy(e -> e.getId()));
List按属性拼接
List<String> jointList = list.stream().map(e -> e.getId()+"a").collect(Collectors.toList());
List转Map
Map<Integer,User> map = userList.stream().collect(Collectors.toMap(User::getId, Function.identity(),(key1,key2)->key1));
持续更新中。。。