Cómo ordenar un objeto de mapa, según el valor o un determinado atributo en el objeto de valor, el atributo es de tipo 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());
});