static AutoCloseable tempRestoreMap(Map map) { if (map == null) null; var cloned = cloneMap(map); ret -> copyCollection(cloned, map); }