package username.dict; import java.io.PrintWriter; /** * Dictionaries that can have specified index and value types. * * @author Samuel A. Rebelsky * @version 1.0 of April 2005 */ public interface NewDict { /** * Add something to the dictionary (or replace something already * in the dictionary). * * @pre * index is not null. * @pre * value is not null. * @post * this.get(index) returns value. */ public void put(I index, V value); /** * Get something from the dictionary. * * @pre * index is not null. * @post * Returns the most recent value for this.put(index,value). */ public V get(I index); /** * Dump the dictionary to the screen or to a file. */ public void dump(PrintWriter pen); } // interface NewDict