code: public Object remove(Object key)
      {
          if (key == null) return null;
          purge();
          int hash = hashCode(key);
          int index = indexFor(hash);
          Entry previous = null;
          Entry entry = table[index];
          while (entry != null)
          {
              if ((hash == entry.hash) && equals(key, entry.getKey()))
              {
                  if (previous == null)
                      table[index] = entry.next;
                  else
                      previous.next = entry.next;
                  this.size--;
                  modCount++;
                  return entry.getValue();
              }
              previous = entry;
              entry = entry.next;
          }
          return null;
      }
docs: Removes the key and its associated value from this map.
  
  @param key  the key to remove
  @return the value associated with that key, or null if
  the key was not in the map