posts - 14,  comments - 37,  trackbacks - 0
           // 內部類定義一個比較器
           
          public class ContentComparator implements Comparator {
            
          public int compare(Object o1, Object o2) {
             MedicineCountForm c1 
          = (MedicineCountForm)o1;
             MedicineCountForm c2 
          = (MedicineCountForm)o2;
             String tm1 
          = String.valueOf(c1.getCount());
             String tm2 
          = String.valueOf(c2.getCount());
             
          if (Integer.parseInt(tm1) > Integer.parseInt(tm2))
              
          return -1;
             
          else if (Integer.parseInt(tm1) < Integer.parseInt(tm2))
              
          return 1;
             
          else
              
          return 0;
            }

           }
          posted on 2008-01-02 10:30 冰封的愛 閱讀(641) 評論(0)  編輯  收藏 所屬分類: J2EE
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 眉山市| 安西县| 罗城| 镶黄旗| 瓦房店市| 乐亭县| 邳州市| 弥渡县| 民乐县| 新民市| 盖州市| 大名县| 抚松县| 通渭县| 措美县| 曲阜市| 肥西县| 云林县| 日土县| 武隆县| 邹城市| 鹿泉市| 广州市| 辽宁省| 崇文区| 尤溪县| 宁蒗| 茂名市| 中西区| 乐陵市| 横山县| 西乌珠穆沁旗| 苍山县| 澄江县| 霍城县| 台南县| 滨海县| 北宁市| 柏乡县| 拉孜县| 大渡口区|