import java.util.*; /** MultiHashMap is a subclass of HashMap designed to work with * multiple associations. * * **/ public class MultiHashMap extends HashMap implements MultiMap { /** Constructs a new, empty map with the specified initial * capacity and the specified load factor. **/ public MultiHashMap(int initialCapacity, float loadFactor) { super(initialCapacity, loadFactor); } /** Constructs a new, empty map with the specified initial * capacity and default load factor, which is 0.75. **/ public MultiHashMap(int initialCapacity) { super(initialCapacity); } /** Constructs a new, empty map with a default capacity and load * factor, which is 0.75. **/ public MultiHashMap() { super(); } /** Constructs a new map with the same mappings as the given * map. The map is created with a capacity of twice the number of * mappings in the given map or 11 (whichever is greater), and a * default load factor, which is 0.75. **/ public MultiHashMap(Map t) { super(); this.putAll(t); } /** Returns the most recently mapped value to which this map maps * the specified key. Returns null if the map contains no * mapping for this key. A return value of null does not * necessarily indicate that the map contains no mapping for the * key; it's also possible that the map explicitly maps the key to * null. The containsKey operation may be used to distinguish * these two cases. * * @returns: the most recently assigned value to which this map * maps the specified key. **/ public Object get(Object key) { } /** Returns an unmodifiable Collection view of all values to which * this map maps the specified key. A return value of null * indicates that this map contains no mappings for the specified * key * * @returns: a Collection of values to which this map maps the * specified key. **/ public Collection getAll(Object key) { } /** Concatenate the specified value with the original value * which is associated with the specified key in this map. * take care of the situation that the specified key * does not exist originally * @effects Concatenate the specified value with the original value * under the specified key * @returns the result of this.get(key) before adding the new value **/ public Object put(Object key, Object value) { } /** Associates key with all elements of c * * @requires c != null * @effects for all e in specified Collection, * put(key, e) **/ public void putAll(Object key, Collection c) { } /** Returns true iff this mapping maps key to value * * @returns true iff getAll(key).contains(value) **/ public boolean contains(Object key, Object value) { } /** Removes a binding from key to value. * * @returns true iff key was associated with value **/ public boolean remove(Object key, Object value) { } }