static LinkedHashMap multiSetAsMap_popularFirst(MultiSet ms) { new LinkedHashMap map; for (A a : ms.highestFirst()) map.put(a, ms.get(a)); ret map; }