Here is the piece of code that I have used for Java 5.0
TreeSet treeSetObj = new TreeSet( Collections.reverseOrder() ) ;
TreeSet treeSetObj = new TreeSet(new Comparator() { public int compare(Integer i1,Integer i2) { return i2.compareTo(i1); } });
there is need to flip the result. But I guess this is just a micro-optimization... Do you really need this ?