List<List<PhysicalsPackageEntity>> physicals_package_code1 = list.stream().map(physicalsItemRecordEntity -> { String physicals_package_code = physicalsItemRecordEntity.getPhysicals_package_code(); QueryWrapper<PhysicalsPackageEntity> physicalsPackageEntityQueryWrapper = new QueryWrapper<>(); physicalsPackageEntityQueryWrapper.eq("physicals_package_code", physicals_package_code); List<PhysicalsPackageEntity> physicalsPackageEntityList = this.list(physicalsPackageEntityQueryWrapper); return physicalsPackageEntityList; }).collect(Collectors.toList());
时间: 2023-03-30 09:04:30 浏览: 69
Cocos2d-x 3.0 开发(九)使用Physicals代替Box2D和chipmunk的3.0 alpha1新版本
5星 · 资源好评率100%
这是一段 Java 代码,它使用了 Lambda 表达式和 Stream API,将一个 List 中的每个元素映射为一个 PhysicalsPackageEntity 对象的 List,并将结果收集到一个新的 List 中。
阅读全文