Key:排序【正序】
TreeMap
Value:排序【正序】
Map<String,Integer> map = new HashMap<String,Integer>();
List<Map.Entry<String, Integer>> mapList = new ArrayList<Map.Entry<String,Integer>>(map.entrySet());
Collections.sort(mapList,new Comparator<Map.Entry<String, Integer>>(){
public int compare(Map.Entry<String, Integer> mp1, Map.Entry<String, Integer> mp2) {
return mp1.getValue() - mp2.getValue();
}
});