Put a value into the map.

@param keyPartA for the key
@param keyPartB for the key
@param value    to put into the map
@return the previous value if found otherwise null
776211
public V put(final int keyPartA, final int keyPartB, final V value) {
        final long key = compoundKey(keyPartA, keyPartB);

        return map.put(key, value);
    }
388828
@SuppressWarnings("unchecked")
    public <KP extends Object> KP getKeyPart(final Class<KP> keyPartClass) {
        return (KP) getListKeyPart().stream()
                                    .filter(kp -> kp != null && keyPartClass.isAssignableFrom(kp.getClass()))
                                    .findFirst()
                                    .get();
    }
225373
public <T> void put(@NonNull String key, @NonNull T value) {
    Preconditions.checkNotNull(value, VALUE_IS_NULL);
    put(key, value, TypeToken.fromValue(value));
  }
287809
@SuppressWarnings("unchecked")
    public V put(final int key, final V value)
    {
        requireNonNull(value, "null values are not supported");

        V evictedValue = null;
        @DoNotSub final int setNumber = Hashing.hash(key, mask);
        @DoNotSub final int setBeginIndex = setNumber << setSizeShift;
        @DoNotSub int i = setBeginIndex;

        for (@DoNotSub int nextSetIndex = setBeginIndex + setSize; i < nextSetIndex; i++)
        {
            if (null == values[i])
            {
                break;
            }

            if (key == keys[i])
            {
                evictedValue = (V)values[i];
                shuffleUp(i, nextSetIndex - 1);

                break;
            }
        }

        if (null == evictedValue)
        {
            evictedValue = (V)values[setBeginIndex + (setSize - 1)];
        }

        shuffleDown(setBeginIndex);

        keys[setBeginIndex] = key;
        values[setBeginIndex] = value;

        cachePuts++;

        if (null != evictedValue)
        {
            evictionConsumer.accept(evictedValue);
        }
        else
        {
            ++size;
        }

        return null;
    }
335440
public MapBuilder<K,V> putIf( K key, Optional<V> value)
    {
    value.ifPresent( v -> map_.put( key, v));
    return this;
    }
885300
public K findKey (int value) {
		K[] keyTable = this.keyTable;
		int[] valueTable = this.valueTable;
		for (int i = capacity + stashSize; i-- > 0;)
			if (keyTable[i] != null && valueTable[i] == value) return keyTable[i];
		return null;
	}
1229692
public void put(String key, byte[] value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindBlob(compiledStatementBindIndex++, value);
			}
		} else if (values != null) {
			values.put(key, value);
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.BYTE_ARRAY);
	}
1216974
public final V put(K key, V value) {
	BinTreeNode<K,V> prev = null;
	BinTreeNode<K,V> node = root;
	int key_hash_code = key.hashCode();

	while(node != null) {
	    prev = node;
	    if(key_hash_code < node.keyHashCode) {
		node = node.left;
	    }
	    else {
		if((key_hash_code > node.keyHashCode) || !node.key.equals(key)) {
		    node = node.right;
		}
		else {
		    cachedHashCode -= node.hashCode();
		    V temp = node.value;
		    node.value = value;
		    cachedHashCode += node.hashCode();
		    return temp;
		}
	    }
	}

	size++;

	BinTreeNode<K,V> new_node = new BinTreeNode<K,V>(key, value);
	cachedHashCode += new_node.hashCode(); // invalidate the cached hash code

	if(prev == null) {
	    root = new_node;
	    return null;
	}

	if(key_hash_code < prev.keyHashCode) {
	    prev.left = new_node;
	}
	else {
	    prev.right = new_node;
	}

	return null;
    }
1110864
public static <K, V> V putToConcurrentMap(ConcurrentMap<K, V> map, K key, V value) {
        V old = map.putIfAbsent(key, value);
        return old != null ? old : value;
    }
230730
public Postcard withCharSequence(@Nullable String key, @Nullable CharSequence value) {
        mBundle.putCharSequence(key, value);
        return this;
    }
722708
public Object put(String key, Object value) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "put", new Object[]{key, PasswordUtils.replaceValueIfKeyIsPassword(key,value)});

    // If the value is null (which is allowed for a Map Message) we can't tell
    // quickly whether the item is already in the map as null, or whether it doesn't exist,
    // so we just assume it will cause a change.
    // For properties we will never get a value of null, and it is properties we are really concerned with.
    if ((!changed)&& (value != null)) {
      Object old = get(key);
      if (value.equals(old)) {          // may as well call equals immediately, as it checks for == and we know value!=null
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put",  "unchanged");
        return old;
      }
      else {
        changed = true;
        Object result = copyMap().put(key, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
        return result;
      }
    }
    else {
      changed = true;
      Object result = copyMap().put(key, value);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "put", PasswordUtils.replaceValueIfKeyIsPassword(key,result));
      return result;
    }
  }
450152
public void put(Byte value) {
		if (value == null) {
			this.compiledStatement.bindNull(compiledStatementBindIndex++);
		} else {
			this.compiledStatement.bindLong(compiledStatementBindIndex++, value);
		}
	}
1183076
public void put(K[] key, V value) {
        Node child = root.get(key[0]);
        if (child == null) {
            child = new Node(key[0]);
            root.put(key[0], child);
        }
        child.addChild(key, value, 1);
    }
843200
public V remove(final int keyPartA, final int keyPartB) {
        final long key = compoundKey(keyPartA, keyPartB);

        return map.remove(key);
    }
1251493
public void put(K key, V value) {
        checkNotNull(key, "Key cannot be null");
        checkNotNull(value, "Value cannot be null");

        Set<V> values = backingMap.get(key);
        if (values == null) {
            values = new HashSet<V>();
            backingMap.put(key, values);
        }
        values.add(value);
    }
787660
private V putForNullKey(V value) {
	for (Entry<K, V> e = table[0]; e != null; e = e.next) {
	    if (e.key == null) {
		V oldValue = e.value;
		e.value = value;
		e.recordAccess(this);
		return oldValue;
	    }
	}
	modCount++;
	addEntry(0, null, value, 0);
	return null;
    }
589781
@Override
    public V putIfAbsent(@NonNull K key, @NonNull V v) {
        Entry<K, V> current = get(key);
        if (current != null) {
            return current.mValue;
        }
        mHashMap.put(key, put(key, v));
        return null;
    }