static Map> pairsToMapWithSetValues(LPair l) { new Map> mm; for (Pair p : unnull(l)) { Set set = mm.get(p.a); if (set == null) mm.put(p.a, set = new HashSet); set.add(p.b); } ret mm; }