...
Code Block | ||
---|---|---|
| ||
public class Container<K,V> { Map<K,V> map; public void initialize() { if(map == null) { synchronized(this) { if(map != null) { map = new HashMap<K,V>(); } } } } public V get(Object k) { if(map != null) { return map.get(k); } else { return null; } } } |
...