code: public void put(final K key, final V value) {
  		if (map.containsKey(key)) {
  			// remove the key from the FIFO queue
  			queue.remove(key);
  		}
  
  		while (queue.size() >= maxSize) {
  			K oldestKey = queue.poll();
  			if (null != oldestKey) {
  				if (listener != null) {
  					listener.onRemove(map.remove(oldestKey));
  				} else {
  					map.remove(oldestKey);
  				}
  			}
  		}
  		queue.add(key);
  		map.put(key, value);
  	}
docs: Put.
  
  @param key the key
  @param value the value