IDictionary.java
Created with JBuilder
/**
* A dictionary with no duplication allowed: old (key, value) pairs are replaced
* by new pairs.
*/
public interface IDictionary {
   /**
   * Post: (key, val) is added to this dictionary, replacing the old pair if any.
   */
   public abstract void store(Object key, Object val);

   /**
   * returns the object associated with key if key is in this dictionary,
   * null otherwise.
   */
   public abstract Object retrieve(Object key);

   /**
   * returns the object associated with key if key is in this dictionary,
   * null otherwise.
   * afterwards, calling retrieve (key) will return null.
   */
   public abstract Object remove(Object key);
}



IDictionary.java
Created with JBuilder