static TreeMap pairsToTreeMap(Collection> l) { new TreeMap map; if (l != null) for (Pair p : l) map.put(p.a, p.b); ret map; }