// return a fancy litorderedmap static Map orderMapByDescendingValue(final Map map) { L l = new ArrayList(map.keySet()); sort(l, mapComparatorDesc(map)); Map map2 = litorderedmap(); for (A a : l) map2.put(a, map.get(a)); ret map2; }