public void put(Object key, Object value) {
    int weight = getWeight(key) + getWeight(value) + OVERHEAD;
    currentWeight += weight;
    if (cache.put(key, value == null ? NULL_VALUE : value) != null) {
      currentWeight -= weight;
    }
  }
public void put ( Object key , Object value ) { int weight = getWeight ( key ) + getWeight ( value ) + OVERHEAD ; currentWeight += weight ; if ( cache . put ( key , value == null ? NULL_VALUE : value ) != null ) { currentWeight -= weight ; } }
Puts the <code>key/value</code> pair into the cache.

@param key key
@param value value