sclass StrictHashMap extends HashMap {
bool detailedExceptions;
public B put(A key, B value) {
B v = get(key);
if (v != null && neq(v, value))
if (detailedExceptions)
fail("Strict map conflict: " + structure(key) + ", " + structure(get(key)) + ", " + structure(value));
else
fail("Trying to change strict map.");
ret super.put(key, value);
}
}