list 对象 String类型 转换成int类型 排序

list.sort(Comparator.comparing(o -> new Integer(o.getQuarter()))); 按从小到大排

infoList.sort(Comparator.comparing(StatServiceIndustryInfo::getMonth)); 
result.sort(Comparator.comparing(o -> Integer.parseInt(o.get("areaCode").toString())));

你可能感兴趣的:(list)