final ListString sheetNames = new ArrayList; final ListListListObject contents = new ArrayList; SetMapEntryString ListListObject entries = scoreDetailMapentrySet; IteratorMapEntry
<p>List<Map.Entry<String, List<List<Object>>>> entryList = new ArrayList<>(scoreDetailMap.entrySet());</p>
<p>List<String> sheetNames = entryList.stream()
.map(Map.Entry::getKey)
.collect(Collectors.toList());</p>
<p>List<List<List<Object>>> contents = entryList.stream()
.map(Map.Entry::getValue)
.collect(Collectors.toList());</p>
<p>entryList.forEach(entry -> System.out.println("方法三的key为:" + entry.getKey() + ", value为:" + entry.getValue()));</p>
原文地址: http://www.cveoy.top/t/topic/hOn4 著作权归作者所有。请勿转载和采集!