Map オブジェクトを値または値オブジェクト内の特定の属性に従って並べ替える方法 (属性は int 型)
Map<String, Object> map = new HashMap<>(); // Object可以换成实体类,按照实体类中的xxxInt进行升序排序
List<Map.Entry<String, Object>> listEntry = new ArrayList<>(map.getValue().entrySet());
Collections.sort(listEntry,(Comparator.comparing(o -> String.valueOf(o.getValue().xxxInt))));
Map<String, Object> map = new LinkedHashMap<>();
// 返回 map
listEntry.forEach(o -> {
map.put(o.getKey(), o.getValue());
});