Put a new value in map.

@param key id of the value for looking up.
@param value the value.
487433
public void put(final String key, final Object value) {
        if (TASK_DIRECTORY_KEY.equals(key) && this.values.keySet().contains(TASK_DIRECTORY_KEY)) {
            // ensure that no one overwrites the task directory
            throw new IllegalArgumentException("Invalid key: " + key);
        }

        if (value == null) {
            throw new IllegalArgumentException(
                    "A null value was attempted to be put into the values object under key: " + key);
        }
        this.values.put(key, value);
    }
461374
public void set(String key, Object value) {
        if (value != null) put(key, value);
        else remove(key);
    }
272615
public Object put(String key, Object value) {
		if (size == keys.length) {
			throw new ArrayIndexOutOfBoundsException(size);
		}
		keys[size] = key;
		values[size] = value;
		size++;
		return value;
	}
906753
public int put(Object key, int value)
  {
    if (key == null)
      key = NULL_KEY;

    synchronized (this) {
      int hash = key.hashCode() & _mask;

      for (Item item = _entries[hash]; item != null; item = item._next) {
        Object testKey = item._key;

        if (testKey == key || testKey.equals(key)) {
          int oldValue = item._value;

          item._value = value;

          return oldValue;
        }
      }

      Item item = new Item(key, value);
      item._next = _entries[hash];

      _entries[hash] = item;

      _size++;
    }

    return NULL;
  }
469082
public final void put(final String key, final String value) {
        final Property prop = find(key);
        if (prop == null) {
            props.add(new Property(key, null, value));
        } else {
            prop.setValue(value);
        }
    }
222145
private static <K, V> void set(Map<K, Set<V>> map, K key, V value) {
    Set<V> values = map.get(key);
    if (values == null) {
      values = new HashSet<>();
      map.put(key, values);
    }
    values.add(value);
  }
1174545
public <T> void set(String key, T value) {
        data.put(key, value);
    }
766055
void add( K key, V value ) {
        List<V> rules = map.get( key );
        if( rules == null ) {
            rules = new ArrayList<>();
            map.put( key, rules );
        }
        rules.add( value );
    }
422640
public void put(String key, String value) {
        synchronized (this.cache) {
            this.cache.put(key, value);
        }
    }
645865
public void put(String key, Object value) {
        PER_THREAD_CONTEXTS.getUnchecked(Thread.currentThread()).put(key, value);
        mdcBridge.put(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);
    }
155156
public void add(Object key, Object value) {
        Object existing = mMap.get(key);
        if (existing instanceof List) {
            if (value instanceof List) {
                ((List)existing).addAll((List)value);
            }
            else {
                ((List)existing).add(value);
            }
        }
        else if (existing == null && !mMap.containsKey(key)) {
            if (value instanceof List) {
                mMap.put(key, new ArrayList((List)value));
            }
            else {
                mMap.put(key, value);
            }
        }
        else {
            List list = new ArrayList();
            list.add(existing);
            if (value instanceof List) {
                list.addAll((List)value);
            }
            else {
                list.add(value);
            }
            mMap.put(key, list);
        }
    }
868964
public void put(final String key, final String value) {
        if (value == null) {
            throw new IllegalArgumentException("No value provided for key " + key);
        }
        validate(key, value);
        data.putValue(key, value);
    }
344762
private MValue setInMap(String key, MValue value) {
        newKey.add(key);
        valueMap.put(key, value);
        return value;
    }
815808
public Object put(Object key, Object value) {
        mCacheMap.put(key, value);
        return mBackingMap.put(key, value);
    }
1290848
public function addValue(string $key, string $value) : void
    {
        $this->map[$key] = $value;
    }
457727
public void put(Object key, Object value)
    {
        keyTable.put(key, value);
        valueTable.put(value, key);
    }