HashTable.java

Download
1/*2 * HashTable.java3 *4 * Computer Science S-22, Harvard University5 */6 7public interface HashTable {8    /*9     * insert - insert the specified (key, value) pair in the hash table.10     * Returns true if the pair can be added and false if there is overflow.11     */12    public boolean insert(Object key, Object value);13    14    /*15     * search - search for the specified key and return the16     * associated collection of values, or null if the key 17     * is not in the table18     */19    public Queue<Object> search(Object key);20    21    /* 22     * remove - remove from the table the entry for the specified key23     * and return the associated collection of values, or null if the key 24     * is not in the table25     */26    public Queue<Object> remove(Object key);27}