// guts of Map.java package java.util; public interface Map { // does not extend Collection // Query Operations int size(); boolean isEmpty(); boolean containsKey(Object key); boolean containsValue(Object value); V get(Object key); // Modification Operations V put(K key, V value); V remove(Object key); // Bulk Operations void putAll(Map t); void clear(); // Views - replace iterators (iterate over Set or Collection instead) Set keySet(); Collection values(); Set> entrySet(); // nested interface to support entry views interface Entry { K getKey(); V getValue(); V setValue(V value); boolean equals(Object o); int hashCode(); } // Comparison and hashing boolean equals(Object o); int hashCode(); }