代码语言:javascript复制
<, > <, > (<, > aMap) {
<, > = LinkedHashMap<>();
aMap.entrySet()
.stream()
.sorted((p1, p2) -> p2.getValue().compareTo(p1.getValue()))
.collect(.()).forEach(ele -> .put(ele.getKey(), ele.getValue()));
;
}
<, > <, > (<, > aMap) {
<, > = LinkedHashMap<>();
aMap.entrySet()
.stream()
.sorted((p1, p2) -> p1.getValue().compareTo(p2.getValue()))
.collect(.()).forEach(ele -> .put(ele.getKey(), ele.getValue()));
;
}