#list转map,set,使用stream进行转化 函数式编程: 场景: 从数据库中取出来的数据,经常是list集合类型,但是list转map这种场景虽然不常见,但是有时候也会遇到,最常见的还是转为set进行数据去重. eg: 1 list转set List<Notification> notifications = notificationMapper.selectByExampleWithRowbounds(example,new RowBounds(offset, size)); 数据…