static HashMap asHashMap(Map map) { if (map instanceof HashMap) ret (HashMap) map; new HashMap m; m.putAll(map); ret m; }