Loading

排序记录

  1. Map可用TreeMap 自动[]排序 
  2. 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;
             }
            }
       });

     

posted @ 2018-10-24 15:53  ichar  阅读(251)  评论(0编辑  收藏  举报