不需要生成新的对象数据,只需要在原对象数据上进行 *** 作即可。
newDatas.Stream().filter(i->i.getName() ==null || StringUtils.isNotBlank(i.getName())).forEach(x->x.setAge("18"));
不要在末尾使用Collectors即可,这样流的 *** 作会在原数据对象上进行。
欢迎分享,转载请注明来源:内存溢出
不需要生成新的对象数据,只需要在原对象数据上进行 *** 作即可。
newDatas.Stream().filter(i->i.getName() ==null || StringUtils.isNotBlank(i.getName())).forEach(x->x.setAge("18"));
不要在末尾使用Collectors即可,这样流的 *** 作会在原数据对象上进行。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)