static <A, B> Map<A, B> toWeakHashMap(Map<A, B> map) { if (isWeakHashMap(map)) ret map; ret putAll(weakMap(), map); }