code: public final V put(K key, V value) {
          if (key == null || value == null) {
              throw new NullPointerException("key == null || value == null");
          }
  
          V previous;
          synchronized (this) {
              putCount++;
              size += safeSizeOf(key, value);
              previous = map.put(key, value);
              if (previous != null) {
                  size -= safeSizeOf(key, previous);
              }
          }
  
          if (previous != null) {
              entryRemoved(false, key, previous, value);
          }
  
          trimToSize(maxSize);
          return previous;
      }
docs: Caches {@code value} for {@code key}. The value is moved to the head of
  the queue.
  
  @return the previous value mapped by {@code key}.