sclass OneMap extends CompactAbstractMap { A key; B value; *() {} *(A *key, B *value) {} *(Map map) { Iterator> it = map.entrySet().iterator(); Map.Entry e = it.next(); key = e.getKey(); value = e.getValue(); assertFalse(it.hasNext()); } public int size() { ret 1; } public Set> entrySet() { ret litset(simpleMapEntry(key, value)); } public bool containsKey(O o) { ret isKey(o); } bool isKey(O o) { ret eq(o, key); } @Override public B get(O o) { ret isKey(o) ? value : null; } }