list转map
List<T> list = new Arraylist(); Map<Long, T> bizAreasMap = list.stream().collect(Collectors.toMap(T::T.getID(), r -> r, (key1, key2) -> key2));
根据list 某个属性过滤
List<T> lists = list.stream().filter(r -> r.getType() == 1).collect(Collectors.toList());
list 转为另一个对象
List<TT> lists = list.stream().map(a -> { TT tt= new TT(); BeanUtils.copyProperties(a, tt); return tt; }).collect(Collectors.toList());
list 分组
Map<Long, List<T>> t= list.stream().collect( Collectors.groupingBy(T::getId));