List<Map<String,Object>> allList = new ArrayList<>();
Collections.sort(allList, new Comparator<Map<String, Object>>() {标签:BigDecimal,ArrayList,Object,List,allList,name2,name1,new From: https://www.cnblogs.com/wangqunye/p/16992389.html
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
BigDecimal name1 = new BigDecimal(o1.get("value").toString()) ;//name1是从你list里的第一个name
BigDecimal name2 = new BigDecimal(o2.get("value").toString()) ;//name2是从你list里的第二个name
return name2.compareTo(name1);
}
});