static HashMap cloneAsHashMap(Map map) { if (map == null) ret litmap(); synchronized(map) { ret new HashMap(map); } }