1: import java.util.Iterator; 2: /** 3: An interface for a dictionary with distinct search keys. 4: @author Frank M. Carrano 5: @author Timothy M. Henry 6: @version 5.0 7: */ 8: public interface DictionaryInterface<K, V> 9: { // See Segment 20.4 for a commented version. 10: public V add(K key, V value); 11: public V remove(K key); 12: public V getValue(K key); 13: public boolean contains(K key); 14: public Iterator<K> getKeyIterator(); 15: public Iterator<V> getValueIterator(); 16: public boolean isEmpty(); 17: public int getSize(); 18: public void clear(); 19: } // end DictionaryInterface