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

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