Collections.sort(resultList, new Comparator<Map<String, Object>>(){
@Override
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
Integer tz1 = Integer.parseInt(o1.get("labelCount").toString());
Integer tz2 = Integer.parseInt(o2.get("labelCount").toString());
if(tz1 < tz2){
return 1;
}else{
return -1;
}
}
});
集合排序
最新推荐文章于 2022-09-22 23:01:38 发布