/*
 * @(#)Indexable.java	1.0 04/07/13
 */
 
/**
 * An interface for a HashTable and other types of containers
 * meant for efficient insert, delete and search operations.
 */
public interface Indexable {
	
	/** Returns the size of the table. */
	public long tableSize();

	/** Returns the number of records in the table. */
	public long recordCount();	

	/**
	 * Inserts Record x into the hash table. If x is
	 * already in the table, the old record is updated by
	 * replacing it with the new record x.
	 */
	public void insert(Record x);

	/**
	 * Deletes from the table the record x, such that x.key = key.
	 *
	 * @exception throws an IndexOutOfBoundsException if
	 *            the specified record is not in the table.
	 *			  NOTE: the exception's message MUST explain
	 *            the reason for throwing the excpetion. e.g.,
	 *            "Key = NNN is not in the table."
	 */
	public void delete(int key) throws IndexOutOfBoundsException;

	/** Returns a the record with record.key = key. */
	public Record search(int key);
}

