asd_library
Interface Dictionary_adt

All Known Implementing Classes:
BSTree, HashTable

public interface Dictionary_adt

The abstract data type of a dictionary


Method Summary
 java.lang.Object find(java.lang.Comparable key)
          Returns the value to which this map maps the specified key.
 java.lang.Object insert(java.lang.Comparable key)
          Inserts the key x in this dictionary.
 java.lang.Comparable remove(java.lang.Comparable key)
          Removes the mapping for this key from this dictionary if it is present
 

Method Detail

insert

public java.lang.Object insert(java.lang.Comparable key)
Inserts the key x in this dictionary.

Parameters:
key - the element to insert

remove

public java.lang.Comparable remove(java.lang.Comparable key)
Removes the mapping for this key from this dictionary if it is present

Parameters:
key - the element to remove.

find

public java.lang.Object find(java.lang.Comparable key)
Returns the value to which this map maps the specified key.

Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key, or null if the map contains no mapping for this key.