code: @SuppressWarnings("unchecked")
    public boolean remove(final Object key) {
      // validate key
      if (key == null) {
        throw new IllegalArgumentException("Null element is not supported.");
      }
      LinkedElement<T> removed = removeElem((T) key);
      shrinkIfNecessary();
      return removed == null ? false : true;
    }
docs: Remove the element corresponding to the key.
  
  @return If such element exists, return true. Otherwise, return false.