📅  最后修改于: 2022-03-11 14:52:06.594000             🧑  作者: Mango
LinkedHashMap sortedMap = new LinkedHashMap<>();
unSortedMap.entrySet()
.stream()
.sorted(Map.Entry.comparingByKey())
.forEachOrdered(x -> sortedMap.put(x.getKey(), x.getValue()));