import java.util.*; public interface MiniMap { /** An interface with some of the functionality of the Java Map interface. Keys are required to be Comparable Objects. */ /** determines whether this MiniMap is empty @return false if there is at least one entry in the map, and true otherwise */ public boolean isEmpty(); /** Add an entry with the given key and value to this MiniMap, unless an entry already exists with the given key. Note that the behavior is different from the method of this name in the Map interface, since there can be no duplicate insertion of a key. @param k the key @param v the value @return true iff the entry was added (iff there was no entry already in the map with the given key) */ public boolean put(Comparable k, Object v); /** This method performs just like the method of this name in the Map interface, except that the key is assumed to be a Comparable object. Note that the return value may be null even if the key is mapped to a value, if that value happens to be null. @param k a key @return the value to which this MiniMap maps the key, or null if no such value exists. */ public Object get(Comparable k); /** This method performs just like the method of this name in the Map interface, except that the key is assumed to be a Comparable object. @param k a key @return true iff this MiniMap contains an entry whose key equals the given key */ public boolean containsKey(Comparable k); /** Traverses this MiniMap @return a List of the values of this MiniMap, in the sorted order given by their keys. */ public List values(); }