static class DerivedHashMap<A, B> extends AbstractMap<A, B> { Map<A, B> base; new HashMap<A, B> additions; *(Map<A, B> *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<Map.Entry<A,B>> entrySet() { throw fail(); } }