Please send questions to st10@humboldt.edu .
/* Cs132HashTable.java 1.0                                */
/* by Sharon Tuttle                                       */
/* last modified: 4-23-03                                 */
/*                                                        */
/* a quick'n'dirty interface for a simple hash table;     */

public interface Cs132HashTable
{
    /*-------------------------------------------------------------
     put()
     Purpose: inserts the Cs132Hashable instance item into the hash
              table.
    --------------------------------------------------------------*/
    public void put(Cs132Hashable item);
              
    /*-----------------------------------------------------------
     get()
     Purpose: returns (non-destructively) the Cs132Hashable instance
              from the hash table whose key is String k. Returns null if 
              there is no instance with this key k.
    -------------------------------------------------------------*/
    public Cs132Hashable get(String k);

    /*--------------------------------------------------------------
     remove()
     Purpose: remove ("destructively") and return the Cs132Hashable
              instance from the hash table whose key is String k. 
              Returns null (and does not change the hash table) if 
              there is no such instance with this key k.
    ----------------------------------------------------------------*/
    public Cs132Hashable remove(String k);

    /*-----------------------------------------------------------------
     isEmpty()
     Purpose: return true if there are no elements in the Cs132HashTable,
              false otherwise.
    ---------------------------------------------------------------------*/
    public boolean isEmpty();

    /*-------------------------------------------------------------------
     size()
     Purpose: returns number of elements within the Cs132HashTable
    --------------------------------------------------------------------*/
    public int size();

    /*-------------------------------------------------------------------
     clear()
     Purpose: removes all elements from Cs132HashTable 
    ---------------------------------------------------------------------*/
    public void clear();
    
    /*-----------------------------------------------------------------
     grabContents()
     Purpose: non-destructively grabs and returns an array of the items 
              currently within this Cs132HashTable (for testing
              and debugging purposes)
    --------------------------------------------------------------------*/
    public Cs132Hashable[] grabContents();
}