public final void add(TKey key,TValue value){
  Preconditions.checkNotNull(key);
  Preconditions.checkNotNull(value);
synchronized (mLock) {
    final Queue<TValue> pool;
    mLruKeyList.push(key);
    if (!mValuePool.containsKey(key)) {
      pool=new LinkedList<>();
      mValuePool.put(key,pool);
    }
 else {
      pool=mValuePool.get(key);
    }
    pool.add(value);
    mSize+=checkedSizeOf(key,value);
    unsafeTrimToSize(mMaxSize);
  }
}

public final void add ( TKey key , TValue value ) { Preconditions . checkNotNull ( key ) ; Preconditions . checkNotNull ( value ) ; synchronized ( mLock ) { final Queue < TValue > pool ; mLruKeyList . push ( key ) ; if ( ! mValuePool . containsKey ( key ) ) { pool = new LinkedList < > ( ) ; mValuePool . put ( key , pool ) ; } else { pool = mValuePool . get ( key ) ; } pool . add ( value ) ; mSize += checkedSizeOf ( key , value ) ; unsafeTrimToSize ( mMaxSize ) ; } }
add a new or previously existing value to the pool . the most recently added item will be placed at the top of the lru list , and will trim existing items off the list , if the list exceeds the maximum size .
