code: protected LinkedElement<T> removeElem(final T key) {
      LinkedElement<T> found = null;
      final int hashCode = key.hashCode();
      final int index = getIndex(hashCode);
      if (entries[index] == null) {
        return null;
      } else if (hashCode == entries[index].hashCode &&
              entries[index].element.equals(key)) {
        // remove the head of the bucket linked list
        modification++;
        size--;
        found = entries[index];
        entries[index] = found.next;
      } else {
        // head != null and key is not equal to head
        // search the element
        LinkedElement<T> prev = entries[index];
        for (found = prev.next; found != null;) {
          if (hashCode == found.hashCode &&
                  found.element.equals(key)) {
            // found the element, remove it
            modification++;
            size--;
            prev.next = found.next;
            found.next = null;
            break;
          } else {
            prev = found;
            found = found.next;
          }
        }
      }
      return found;
    }
docs: Remove the element corresponding to the key, given key.hashCode() == index.
  
  @return If such element exists, return true. Otherwise, return false.