static Pair, L> lookupAllOpt2(Map map, Collection l) { new L out; new L notfound; if (l != null) for (A a : l) { B b = map.get(a); if (b != null) out.add(b); else notfound.add(a); } ret pair(out, notfound); } static Pair, L> lookupAllOpt2(Collection l, Map map) { ret lookupAllOpt2(map, l); }