Map singleAppMap = null; if (CollectionUtils.isNotEmpty(list)) { singleAppMap = list.stream() .filter(single -> StringUtils.equals(serialNumber, (String)((HashMap)single).get("WBSNO"))) .findFirst() .orElse(null); }

final Map singleAppMap = CollectionUtilsisNotEmptylist HashMapliststreamfiltersingle - StringUtilsequalsserialNumber String HashMap singlegetWBSNOfindFirstorElsenull

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

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