List<Entity> entities = Arrays.stream(ids.split(","))
.map(id -> new Entity(Long.valueOf(id))).collect(Collectors.toList());
List<Entity> entities = Arrays.stream(ids.split(","))
.map(id -> new Entity(Long.valueOf(id))).collect(Collectors.toList());
本文标题:stream.map.collect 遍历集合后返回新集合
本文链接:https://www.haomeiwen.com/subject/prrushtx.html
网友评论