// An IMap is an object of any class that implements IMap. // // Interpretation: An IMap represents an immutable finite function // from keys to values. // // IMap extends java.util.Map, so an IMap can be used // as an unmodifiable Map. import java.util.Map; interface IMap extends Map { // Returns an IMap like this one except the given key is associated // with the given value. The extend operation does not modify this // IMap. // // Invariant: the key cannot be null. IMap extend (K key, V value); }