本帖最后由 xyy001 于 2009-06-15 14:21:00 编辑

解决方案 »

  1.   

    你这不是已经实现了吗?SortedSet <Item> sortByDescription = new TreeSet <Item>(new 
            Comparator <Item>() 
            {  
                public int compare(Item a, Item b) 
                {  
                  String descrA = a.getDescription(); 
                  String descrB = b.getDescription(); 
                  return descrA.compareTo(descrB); 
                } 
            });