Possible Duplicate:
TreeMap sort by value
Hi I want to sort TreeMap Collection by value not by its key. For eg,
 TreeMap map=new TreeMap();
    map.put(new Integer(100),"ccc");
    map.put(new Integer(300),"bbb");
    map.put(new Integer(200),"ddd");
    map.put(new Integer(400),"aaa");
It should be ordered as,
1) 400 -> aaa
2) 300 -> bbb
3) 100 -> ccc
4) 200 -> ddd
 
     
    