LIST 删除重复

   for (int i = 0; i < returnList.size() - 1; i++) {
   ManMenue manMenue1 = (ManMenue)returnList.get(i);
      for (int j = returnList.size() - 1; j > i; j--) {
      ManMenue manMenue2 = (ManMenue)returnList.get(j);
       if (manMenue1.getId().getMid().compareTo(manMenue2.getId().getMid())==0) {
        returnList.remove(j);
       }
      }
     }

posted @ 2012-02-21 18:04  七郎  Views(176)  Comments(0Edit  收藏  举报