code: @Override
      public Object remove(Object key, boolean dropRef)
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "remove", new Object[] { key, new Boolean(dropRef) });
  
          Bucket bucket = getBucketForKey(key);
          Object object = null;
  
          if (bucket != null) // d739870
          {
              synchronized (bucket) {
                  Element element = bucket.removeByKey(key, dropRef);
                  object = element != null ? element.object : null;
              }
  
              if (object != null) {
                  synchronized (this) {
                      // ACK! This is going to be a choke point
                      numObjects--;
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "remove", object);
  
          return object;
      }
docs: Remove the object associated with the specified key from the cache. <p>
  
  In order to remove an object from the cache, the object must either
  not be pinned or must be pinned exactly once, presumably by the
  caller. Note, however, that there is no way to verify that the caller
  actually owns the pinned reference. <p>
  
  This relaxation is needed in order to allow for situations where
  an object needs to be removed from the cache but remain in use. <p>
  
  Also note that if an object is removed while still pinned, the final
  call to unpin is unnecessary, and is also illegal. <p>
  
  @param key the key for the object to remove from the cache.
  @param dropRef if true, drop a reference on the object before
  removing from the cache.
  
  @return the object which was removed from the cache.
  
  @exception IllegalOperationException if the object associated with
  the key is currently pinned more than once.