static HashMap twoElementListsToHashMap(Collection> l) { new HashMap map; if (l != null) for (L p : l) if (l(p) == 2) map.put(first(p), second(p)); ret map; }