static class DerivedHashMap extends AbstractMap { Map base; new HashMap additions; *(Map *base) {} public B get(Object key) { B b = additions.get(key); if (b != null) return b; return base.get(key); } public B put(A key, B value) { return additions.put(key, value); } public Set> entrySet() { throw fail(); } }