code: public Element discardByKey(Object key)
      {
          int i = findIndexByKey(key);
          Element element = null;
  
          if (i != -1) {
              element = (Element) get(i);
  
              if (element.pinned > 0) {
                  return null;
              }
              remove(i);
          }
          return element;
      }
docs: Similar to removeByKey, avoids throwing an exception when an object
  cannot be evicted, because it is pinned, instead returns null.
  This method is primarily for use with eviction strategies.
  
  @param key key of the object element to be removed.
  @return the Element holding the removed object.