Java8 stream常用方法归纳
时间:2021-06-29 16:11:07
收藏:0
阅读:0
1.设置集合中全部元素的某一个属性的值
Integer status = NoticeReadStatusEnum.READED.getCode(); List<NoticeSendRecord> collect = noticeSendRecordList.stream().map(record -> { record.setStatus(status); return record; }).collect(Collectors.toList());
评论(0)