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)

          隨筆檔案

          文章分類

          文章檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 长海县| 焉耆| 永昌县| 仁寿县| 荣成市| 千阳县| 顺义区| 泽州县| 海盐县| 福州市| 平和县| 句容市| 托克托县| 宝应县| 丰县| 酉阳| 宾阳县| 洛阳市| 长汀县| 固原市| 中山市| 扎鲁特旗| 定州市| 惠水县| 万安县| 曲靖市| 义乌市| 云安县| 昌宁县| 崇文区| 扬中市| 武胜县| 达日县| 准格尔旗| 铅山县| 炎陵县| 唐河县| 建宁县| 柘荣县| 朝阳市| 洛宁县|