static > MultiMap mapToMultiMap(Map map) {
if (map == null) null;
MultiMap mm = similarEmptyMultiMap(map);
for (A key, Cl values : map)
mm.putAll(key, values);
ret mm;
}
static MultiMap lambdaMapLike mapToMultiMap(IF1> f, Iterable l) {
new MultiMap mm;
fOr (A o : l) {
Pair p = f.get(o);
mm.put(p.a, p.b);
}
ret mm;
}
static MultiMap mapToMultiMap(Iterable l, IF1> f) {
ret mapToMultiMap(f, l);
}