static Pair syncGetOrCreate2(Map map, A key, Class c) ctex { synchronized(map) { B b = map.get(key); if (b == null) { map.put(key, b = c.newInstance()); ret pair(b, true); } ret pair(b, false); } } static Pair nuLike syncGetOrCreate2(Class c, Map map, A key) { ret syncGetOrCreate2(map, key, c); } static Pair syncGetOrCreate2(Map map, A key, F0 f) ctex { synchronized(map) { B b = map.get(key); if (b == null) { map.put(key, b = callF(f)); ret pair(b, true); } ret pair(b, false); } } static Pair syncGetOrCreate2(Map map, A key, IF0 f) ctex { synchronized(map) { B b = map.get(key); if (b == null) { map.put(key, b = f!); ret pair(b, true); } ret pair(b, false); } }