static Map reverseMultiMapAsMap(MultiMap mm) { new HashMap map; for (A a : mm.keys()) for (B b : mm.get(a)) map.put(b, a); ret map; }