Delegates to the underlying {@link java.util.Map}.

@see java.util.Map#put(Object, Object)
435818
@Override
    public R put(D key, R value) {
        return map.put(key, value);
    }
1360119
@Override
    public Object put(String key, Object value) {
        DeserializationState deserializationState = _deserState.get();
        if (deserializationState.isDeserialized()) {
            return deserializationState.deserialized.put(key, value);
        }
        return deserializationState.overrides.put(key, value);
    }
121627
public synchronized void putAll(Map<Key, Value> m) {
    for (Map.Entry<Key, Value> entry : m.entrySet()) {
      this.put(entry.getKey(), entry.getValue());
    }
  }
180457
public void put(K key, V value) {
        Set<V> set = storage.get(key);
        if (set == null) {
            set = new HashSet<>();
            storage.put(key, set);
        }
        set.add(value);
    }
1062867
public V put(K key, V value) {

        if ((key != null) && (value != null)) {
            return m_internalMap.put(key, value);
        }
        Exception e = new Exception();
        try {
            // we want to print a stack trace when null is used as a key/value
            throw e;
        } catch (Exception e2) {
            e = e2;
        }
        if (key == null) {
            LOG.warn("Invalid null key in map", e);
            return null;
        }
        if (value == null) {
            LOG.warn("Invalid null value in map", e);
            return m_internalMap.remove(key);
        }
        return null;
    }
365975
public synchronized final V put(K key, V value) {
        if (key == null) {
            throw new NullPointerException("key == null");
        } else if (value == null) {
            throw new NullPointerException("value == null");
        }

        V previous = map.put(key, value);
        trimToSize(maxSize);
        return previous;
    }
452433
public V put(final Object key, final Object value)
    {
        final Object val = mapNullValue(value);
        requireNonNull(val, "value cannot be null");

        final Object[] entries = this.entries;
        final int mask = entries.length - 1;
        int index = Hashing.evenHash(key.hashCode(), mask);
        Object oldValue = null;

        while (entries[index + 1] != null)
        {
            if (entries[index] == key || entries[index].equals(key))
            {
                oldValue = entries[index + 1];
                break;
            }

            index = next(index, mask);
        }

        if (oldValue == null)
        {
            ++size;
            entries[index] = key;
        }

        entries[index + 1] = val;

        increaseCapacity();

        return unmapNullValue(oldValue);
    }
1252294
public V put(Map.Entry<K, V> entry) {
        return put(entry.getKey(), entry.getValue());
    }
622138
@Override
  public List<String> put(String key, List<String> value) {
    return getMap().put(key, value);
  }
724723
@Override
    public Object put(Object key, Object value, int priority, long timeToLive, int sharingPolicy, Object dependencyIds[]) {
        return insert(String.valueOf(key), value);
    }
484704
protected final void mapUpdate(Map map, Object key, Object value) {
        Object o = map.get(key);
        /*
          If a value exists in map.get(key), convert the "value" parameter into
          the type of map.get(key).  It's a best guess as to what the type of the
          Map _should_ be without any further reflective information about the
          types contained in the map.
         */
        if(o != null) {
            Class type = o.getClass();
            value = ParseUtils.convertType(value, type);
        }

        map.put(key, value);
    }
358709
public Object put(Object key, Object value) {
    return next.put(key, value);
  }
638589
public void putMap (Map<String,String> map) {                                                       //SIB0163.comms.1
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putMap", "map="+map);

     if (map != null) {
       final Set<String> keys = map.keySet();
       putShort(keys.size()); // Number of entries
       for (String k: keys) {
         putString(k);
         putString(map.get(k));
       }
     } else {
       putShort(0);
     }

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "putMap");
   }
1068477
public Object put(Object key, Object value)
    {
        if (null == key) throw new IllegalArgumentException("key must not be null");
        if (!(key instanceof String)) throw new IllegalArgumentException("key must be a String");

        if (!isValidObject(value))
        {
            if (value != null)
            {
                throw new IllegalArgumentException("Invalid type of value.  Type: [" + value.getClass().getName() + "] with value: [" + value.toString() + "]");
            }
            else
            {
                throw new IllegalArgumentException("Invalid type of value.");
            }
        }
        return super.put(key, value);
    }
238359
public void into(Map<String, String> map) {
        for (String name : properties.stringPropertyNames()) {
            map.put(name, properties.getProperty(name));
        }
    }
578751
@Override
    public void putAll(Map<? extends K, ? extends V> m) {
	for (Map.Entry<? extends K, ? extends V> e: m.entrySet())
	    put(e.getKey(), e.getValue());
    }

    /**
     * Removes the key (and its corresponding value) from this map. This method does nothing if the key
     * is not in the map.
     *
     * @param key the key that needs to be removed
     * @return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no mapping
     *         for <tt>key</tt>
     * @throws NullPointerException if the specified key is null
     */
    @Override
    public V remove(Object key) {
	int hash = hash(key);
	return segmentFor(hash).remove(key, hash, null, header, null);
    }

    @Override
    public V r(K key) throws PageException {
	int hash = hash(key);
	return segmentFor(hash).removeE(this, key, hash, null, header);
    }

    @Override
    public V r(K key, V defaultValue) {
	int hash = hash(key);
	return segmentFor(hash).remove(key, hash, null, header, defaultValue);
    }

    /**
     * {@inheritDoc}
     *
     * @throws NullPointerException if the specified key is null
     */
    @Override
    public boolean remove(Object key, Object value) {
	int hash = hash(key);
	if (value == null) return false;
	return segmentFor(hash).remove(key, hash, value, header, null) != null;
    }

    /**
     * {@inheritDoc}
     *
     * @throws NullPointerException if any of the arguments are null
     */
    @Override
    public boolean replace(K key, V oldValue, V newValue) {
	if (oldValue == null || newValue == null) throw new NullPointerException();
	int hash = hash(key);
	return segmentFor(hash).replace(key, hash, oldValue, newValue);
    }

    /**
     * {@inheritDoc}
     *
     * @return the previous value associated with the specified key, or <tt>null</tt> if there was no
     *         mapping for the key
     * @throws NullPointerException if the specified key or value is null
     */
    @Override
    public V replace(K key, V value) {
	if (value == null) throw new NullPointerException();
	int hash = hash(key);
	return segmentFor(hash).replace(key, hash, value);
    }

    /**
     * Removes all of the mappings from this map.
     */
    @Override
    public void clear() {
	for (int i = 0; i < segments.length; ++i)
	    segments[i].clear(header);
	header.before = header.after = header;
    }

    /**
     * Returns <tt>true</tt> if this map should remove its eldest entry. This method is invoked by
     * <tt>put</tt> and <tt>putAll</tt> after inserting a new entry into the map. It provides the
     * implementor with the opportunity to remove the eldest entry each time a new one is added. This is
     * useful if the map represents a cache: it allows the map to reduce memory consumption by deleting
     * stale entries.
     *
     * <p>
     * Sample use: this override will allow the map to grow up to 100 entries and then delete the eldest
     * entry each time a new entry is added, maintaining a steady state of 100 entries.
     * 
     * <pre>
     * private static final int MAX_ENTRIES = 100;
     *
     * protected boolean removeEldestEntry(Map.Entry eldest) {
     *     return size() > MAX_ENTRIES;
     * }
     * </pre>
     *
     * <p>
     * This method typically does not modify the map in any way, instead allowing the map to modify
     * itself as directed by its return value. It <i>is</i> permitted for this method to modify the map
     * directly, but if it does so, it <i>must</i> return <tt>false</tt> (indicating that the map should
     * not attempt any further modification). The effects of returning <tt>true</tt> after modifying the
     * map from within this method are unspecified.
     *
     * <p>
     * This implementation merely returns <tt>false</tt> (so that this map acts like a normal map - the
     * eldest element is never removed).
     *
     * @param eldest The least recently inserted entry in the map, or if this is an access-ordered map,
     *            the least recently accessed entry. This is the entry that will be removed it this
     *            method returns <tt>true</tt>. If the map was empty prior to the <tt>put</tt> or
     *            <tt>putAll</tt> invocation resulting in this invocation, this will be the entry that
     *            was just inserted; in other words, if the map contains a single entry, the eldest
     *            entry is also the newest.
     * @return <tt>true</tt> if the eldest entry should be removed from the map; <tt>false</tt> if it
     *         should be retained.
     */
    protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
	return false;
    }

    /**
     * Returns a {@link Set} view of the keys contained in this map. The set is backed by the map, so
     * changes to the map are reflected in the set, and vice-versa. The set supports element removal,
     * which removes the corresponding mapping from this map, via the <tt>Iterator.remove</tt>,
     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It
     * does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Set<K> keySet() {
	Set<K> ks = keySet;
	return (ks != null) ? ks : (keySet = new KeySet());
    }

    /**
     * Returns a {@link Collection} view of the values contained in this map. The collection is backed
     * by the map, so changes to the map are reflected in the collection, and vice-versa. The collection
     * supports element removal, which removes the corresponding mapping from this map, via the
     * <tt>Iterator.remove</tt>, <tt>Collection.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and
     * <tt>clear</tt> operations. It does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Collection<V> values() {
	Collection<V> vs = values;
	return (vs != null) ? vs : (values = new Values());
    }

    /**
     * Returns a {@link Set} view of the mappings contained in this map. The set is backed by the map,
     * so changes to the map are reflected in the set, and vice-versa. The set supports element removal,
     * which removes the corresponding mapping from the map, via the <tt>Iterator.remove</tt>,
     * <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It
     * does not support the <tt>add</tt> or <tt>addAll</tt> operations.
     *
     * <p>
     * The view's <tt>iterator</tt> is a "weakly consistent" iterator that will never throw
     * {@link ConcurrentModificationException}, and guarantees to traverse elements as they existed upon
     * construction of the iterator, and may (but is not guaranteed to) reflect any modifications
     * subsequent to construction.
     */
    @Override
    public Set<Map.Entry<K, V>> entrySet() {
	Set<Map.Entry<K, V>> es = entrySet;
	return (es != null) ? es : (entrySet = new EntrySet());
    }

    /**
     * Returns an enumeration of the keys in this table.
     *
     * @return an enumeration of the keys in this table
     * @see #keySet()
     */
    public Enumeration<K> keys() {
	return new KeyIterator();
    }

    /**
     * Returns an enumeration of the values in this table.
     *
     * @return an enumeration of the values in this table
     * @see #values()
     */
    public Enumeration<V> elements() {
	return new ValueIterator();
    }

    /* ---------------- Iterator Support -------------- */

    abstract class HashIterator {
	HashEntry<K, V> nextEntry = null;
	HashEntry<K, V> lastReturned = null;

	HashEntry<K, V> snapshotHeader = null;

	HashIterator() {
	    if (evictionPolicy.recordAccess(header, header) != null) snapshotHeader = header.cloneAll(header);
	    else snapshotHeader = header;

	    nextEntry = snapshotHeader.after;
	}

	public boolean hasMoreElements() {
	    return hasNext();
	}

	public boolean hasNext() {
	    return nextEntry != snapshotHeader;
	}

	HashEntry<K, V> nextEntry() {
	    if (nextEntry == snapshotHeader) throw new NoSuchElementException();
	    HashEntry<K, V> e = lastReturned = nextEntry;
	    nextEntry = e.after;

	    return e;
	}

	public void remove() {
	    if (lastReturned == null) throw new IllegalStateException();
	    ConcurrentLinkedHashMapPro.this.remove(lastReturned.key);
	    lastReturned = null;
	}

    }

    final class KeyIterator extends HashIterator implements Iterator<K>, Enumeration<K> {
	@Override
	public K next() {
	    return super.nextEntry().key;
	}

	@Override
	public K nextElement() {
	    return super.nextEntry().key;
	}
    }

    final class ValueIterator extends HashIterator implements Iterator<V>, Enumeration<V> {
	@Override
	public V next() {
	    return super.nextEntry().value;
	}

	@Override
	public V nextElement() {
	    return super.nextEntry().value;
	}
    }

    /**
     * Custom Entry class used by EntryIterator.next(), that relays setValue changes to the underlying
     * map.
     */
    final class WriteThroughEntry extends AbstractMap.SimpleEntry<K, V> implements Map.Entry<K, V> {

	private static final long serialVersionUID = 1573332674915851631L;

	WriteThroughEntry(K k, V v) {
	    super(k, v);
	}

	/**
	 * Set our entry's value and write through to the map. The value to return is somewhat arbitrary
	 * here. Since a WriteThroughEntry does not necessarily track asynchronous changes, the most recent
	 * "previous" value could be different from what we return (or could even have been removed in which
	 * case the put will re-establish). We do not and cannot guarantee more.
	 */
	@Override
	public V setValue(V value) {
	    if (value == null) throw new NullPointerException();
	    V v = super.setValue(value);
	    ConcurrentLinkedHashMapPro.this.put(getKey(), value);
	    return v;
	}
    }

    final class EntryIterator extends HashIterator implements Iterator<Map.Entry<K, V>> {
	@Override
	public Map.Entry<K, V> next() {
	    HashEntry<K, V> e = super.nextEntry();
	    return new WriteThroughEntry(e.key, e.value);
	}
    }

    final class KeySet extends AbstractSet<K> {
	@Override
	public Iterator<K> iterator() {
	    return new KeyIterator();
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public boolean contains(Object o) {
	    return ConcurrentLinkedHashMapPro.this.containsKey(o);
	}

	@Override
	public boolean remove(Object o) {
	    return ConcurrentLinkedHashMapPro.this.remove(o) != null;
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    final class Values extends AbstractCollection<V> {
	@Override
	public Iterator<V> iterator() {
	    return new ValueIterator();
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public boolean contains(Object o) {
	    return ConcurrentLinkedHashMapPro.this.containsValue(o);
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    final class EntrySet extends AbstractSet<Map.Entry<K, V>> {
	@Override
	public Iterator<Map.Entry<K, V>> iterator() {
	    return new EntryIterator();
	}

	@Override
	public boolean contains(Object o) {
	    if (!(o instanceof Map.Entry<?, ?>)) return false;
	    Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
	    V v = ConcurrentLinkedHashMapPro.this.get(e.getKey());
	    return v != null && v.equals(e.getValue());
	}

	@Override
	public boolean remove(Object o) {
	    if (!(o instanceof Map.Entry<?, ?>)) return false;
	    Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
	    return ConcurrentLinkedHashMapPro.this.remove(e.getKey(), e.getValue());
	}

	@Override
	public int size() {
	    return ConcurrentLinkedHashMapPro.this.size();
	}

	@Override
	public boolean isEmpty() {
	    return ConcurrentLinkedHashMapPro.this.isEmpty();
	}

	@Override
	public void clear() {
	    ConcurrentLinkedHashMapPro.this.clear();
	}
    }

    /* ---------------- Serialization Support -------------- */

    /**
     * Save the state of the <tt>ConcurrentHashMap</tt> instance to a stream (i.e., serialize it).
     * 
     * @param s the stream
     * @serialData the key (Object) and value (Object) for each key-value mapping, followed by a null
     *             pair. The key-value mappings are emitted in no particular order.
     */
    private void writeObject(java.io.ObjectOutputStream s) throws IOException {
	s.defaultWriteObject();

	for (int k = 0; k < segments.length; ++k) {
	    Segment<K, V> seg = segments[k];
	    seg.lock();
	    try {
		HashEntry<K, V>[] tab = seg.table;
		for (int i = 0; i < tab.length; ++i) {
		    for (HashEntry<K, V> e = tab[i]; e != null; e = e.next) {
			s.writeObject(e.key);
			s.writeObject(e.value);
		    }
		}
	    }
	    finally {
		seg.unlock();
	    }
	}
	s.writeObject(null);
	s.writeObject(null);
    }

    /**
     * Reconstitute the <tt>ConcurrentLinkedHashMap</tt> instance from a stream (i.e., deserialize it).
     * 
     * @param s the stream
     */
    private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
	s.defaultReadObject();

	// Initialize each segment to be minimally sized, and let grow.
	for (int i = 0; i < segments.length; ++i) {
	    segments[i].setTable(new HashEntry[1]);
	}

	// Read the keys and values, and put the mappings in the table
	for (;;) {
	    K key = (K) s.readObject();
	    V value = (V) s.readObject();
	    if (key == null) break;
	    put(key, value);
	}
    }

    public interface Entry<K, V> extends Map.Entry<K, V> {

	/**
	 * Returns the entry before this entry in the entry list.
	 */
	Entry<K, V> getBefore();

	/**
	 * Returns the entry after this entry in the entry list.
	 */
	Entry<K, V> getAfter();

	/**
	 * Returns the entry's access count.
	 */
	long getAccessCount();

	/**
	 * Returns the entry's creation time in milliseconds.
	 */
	long getCreationTime();

	/**
	 * Returns the entry's last access time in milliseconds.
	 */
	long getLastAccessTime();

    }
}
815808
public Object put(Object key, Object value) {
        mCacheMap.put(key, value);
        return mBackingMap.put(key, value);
    }