public V put(K pKey, V pValue) {
        TimedEntry<K, V> entry = (TimedEntry<K, V>) entries.get(pKey);
        V oldValue;

        if (entry == null) {
            oldValue = null;

            entry = createEntry(pKey, pValue);

            entries.put(pKey, entry);
        }
        else {
            oldValue = entry.mValue;
            entry.setValue(pValue);
            entry.recordAccess(this);
        }

        // Need to remove expired objects every now and then
        // We do it in the put method, to avoid resource leaks over time.
        removeExpiredEntries();
        modCount++;

        return oldValue;
    }
public V put ( K pKey , V pValue ) { TimedEntry < K , V > entry = ( TimedEntry < K , V > ) entries . get ( pKey ) ; V oldValue ; if ( entry == null ) { oldValue = null ; entry = createEntry ( pKey , pValue ) ; entries . put ( pKey , entry ) ; } else { oldValue = entry . mValue ; entry . setValue ( pValue ) ; entry . recordAccess ( this ) ; } removeExpiredEntries ( ) ; modCount ++ ; return oldValue ; }
Associates the specified pValue with the specified pKey in this map
(optional operation).  If the map previously contained a mapping for
this pKey, the old pValue is replaced.

@param pKey   pKey with which the specified pValue is to be associated.
@param pValue pValue to be associated with the specified pKey.
@return previous pValue associated with specified pKey, or {@code null}
if there was no mapping for pKey.  A {@code null} return can
also indicate that the map previously associated {@code null}
with the specified pKey, if the implementation supports
{@code null} values.