List of utility methods to do HashMap Sort
List | sortMapByValue(HashMap sort Map By Value List<Map.Entry<K, V>> orderList = new ArrayList<Map.Entry<K, V>>(map.entrySet()); Collections.sort(orderList, new Comparator<Map.Entry<K, V>>() { @Override @SuppressWarnings("unchecked") public int compare(Map.Entry<K, V> o1, Map.Entry<K, V> o2) { return (((Comparable<V>) o2.getValue()).compareTo(o1.getValue())) * sort; }); ... |