The Map ADT consists of the methods:

  • get(k): if map has an entry , return ; else null.
  • put(k,v): if does not have an entry then add it to the map and return null; otherwise, replace with the new value and return the old value.
  • remove(k): if the map has entry with key , remove it from and return associated value otherwise return null.
  • size(): return number of entries in
  • isEmpty(): test whether is empty
  • entrySet(): return an iterable collection of entries in
  • keySet(): return an iterable collection of keys in
  • values(): return an iterator of the values in