- Map可用TreeMap 自动[]排序
- List 可用Collections.sort方法实现
Collections.sort(allCompanys,new Comparator<PrpLremoteLook>(){ public int compare(PrpLremoteLook p1,PrpLremoteLook p2){ if(Integer.parseInt(p1.getComCode())>Integer.parseInt(p2.getComCode())){ return 1; }else{ return 0; } } });
转载于:https://www.cnblogs.com/imaye/p/9843945.html