static B getOrCreate_allowNull(Map map, A key, IF0 f) ctex { synchronized(map) { // avoid race condition if (map.containsKey(key)) ret map.get(key); } B b = f!; map.put(key, b); ret b; }