static LinkedHashMap lhm_replaceFirstKey(Map map, A newKey) { new LinkedHashMap out; bool first = true; for (A a, B b : unnull(map)) { if (first) { out.put(newKey, b); first = false; } else out.put(a, b); } ret out; }