可以使用Optional类的ofNullable方法来判断scoreItemTableSourceVOS是否为空。代码示例如下:

Optional<Map.Entry<String, List>> optional = Optional.ofNullable(scoreItemTableSourceVOS); optional.ifPresent(entry -> entry.getValue().stream() .map(this::getEachRowOfData) .collect(Collectors.toList()));

MapEntryString ListScoreItemTableSourceVO scoreItemTableSourceVOSscoreItemTableSourceVOSgetValuestream mapthisgetEachRowOfData collectCollectorstoList;scoreItemTableSourceVOS怎么判空

原文地址: http://www.cveoy.top/t/topic/h9Ef 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录