Puts a value into a map of key -> list of values. If the specified key
is new, it creates an {@link ArrayList} as its value.
@param map a {@link Map}.
@param key a key.
@param valueElt a value.
14815
public static <K, V> void putList(Map<K, List<V>> map, K key, V valueElt) {
        if (map.containsKey(key)) {
            List<V> l = map.get(key);
            l.add(valueElt);
        } else {
            List<V> l = new ArrayList<>();
            l.add(valueElt);
            map.put(key, l);
        }
    }
1031013
public void add(K key, V value) {
		List<V> values = this.targetMap.get(key);
		if (values == null) {
			values = new LinkedList<V>();
			this.targetMap.put(key, values);
		}
		values.add(value);
	}
688852
public static <K, V> void putListMult(Map<K, List<V>> map, K key,
            Collection<? extends V> values) {
        for (V value : values) {
            putList(map, key, value);
        }
    }
1355300
@Override
    public List<V> put(K key, List<V> valueList) {
        return listMap.put(key, valueList);
    }
1205422
public void add(K key, V value)
  {
    if (key == null) {
      return;
    }

    K []keys = _keys;
    final int size = _size;
    
    for (int i = size - 1; i >= 0; i--) {
      if (key.equals(keys[i])) {
        _values[i].add(value);
        return;
      }
    }

    if (! ensureCapacity(size)) {
      return;
    }
    
    _keys[size] = key;
    _values[size] = new ArrayList<V>();
    _values[size].add(value);
    
    _size = size + 1;
  }
439026
public static <K> void incrementCount(Map<K, Integer> map, K k)
    {
        map.put(k, getCount(map, k)+1);
    }
509503
public boolean add(final K key, final V value) {
        if (!this.map.containsKey(key)) {
            this.map.put(key, new ArrayList<V>());
        }
        return this.map.get(key).add(value);
    }
735015
public void putMap(Map<String, String> map)
    {
        if (map == null) {
            putNumber1(0);
        }
        else {
            Utils.checkArgument(map.size() < 256, "Map has to be smaller than 256 elements");
            putNumber1(map.size());
            for (Entry<String, String> entry : map.entrySet()) {
                if (entry.getKey().contains("=")) {
                    throw new IllegalArgumentException("Keys cannot contain '=' sign. " + entry);
                }
                if (entry.getValue().contains("=")) {
                    throw new IllegalArgumentException("Values cannot contain '=' sign. " + entry);
                }
                String val = entry.getKey() + "=" + entry.getValue();
                putString(val);
            }
        }
    }
1182627
public void putAll(final Map<String, String> map) {
        for (final Map.Entry<String, ?> entry : map.entrySet()) {
            data.putValue(entry.getKey(), entry.getValue());
        }
    }
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
617786
public void putAll(Map<String, ? extends Object> map) {
        if (map.size() > 0) {
            for (String key : map.keySet()) {
                if (VALID_KEY.matcher(key).matches() == false) {
                    throw new IllegalArgumentException("Invalid key for FlexiBean: " + key);
                }
            }
            if (data == Collections.EMPTY_MAP) {
                data = new LinkedHashMap<>(map);
            } else {
                data.putAll(map);
            }
        }
    }
1233571
public void put (int key, Object value)
    {
        int size = _keys.length, start = key % size, iidx = -1;
        for (int ii = 0; ii < size; ii++) {
            int idx = (ii + start) % size;
            if (_keys[idx] == key) {
                _values[idx] = value;
                return;
            } else if (iidx == -1 && _keys[idx] == -1) {
                iidx = idx;
            }
        }

        if (iidx != -1) {
            _keys[iidx] = key;
            _values[iidx] = value;
            return;
        }

        // they booched it!
        String errmsg = "You fool! You've filled up your cheap int map! " +
            "[keys=" + StringUtil.toString(_keys) +
            ", values=" + StringUtil.toString(_values) + "]";
        throw new RuntimeException(errmsg);
    }
128235
public static <K, V> void putIntoValueHashSet(Map<K, Set<V>> map, K key, V value) {
    CollectionFactory<V> factory = CollectionFactory.hashSetFactory();
    putIntoValueCollection(map, key, value, factory);
  }
26894
public void putAll(Map<?, ?> map) {
		Assert.notNull(map, "Map must not be null");
		assertNotReadOnlySystemAttributesMap(map);
		map.forEach(this::put);
	}
1347696
public static <K, V> void putSetAll(Map<K, Set<V>> map, Map<K, Set<V>> other) {
        for (Map.Entry<K, Set<V>> me : other.entrySet()) {
            putSetMult(map, me.getKey(), me.getValue());
        }
    }
403432
public static void removeValue(Map map, Object value) {
	Iterator it = map.entrySet().iterator();
	Map.Entry entry;
	while (it.hasNext()) {
	    entry = (Entry) it.next();
	    if (entry.getValue() == value) it.remove();
	}
    }
1131849
public static ValueMap map(Object... map) {
        if (map.length / 2 * 2 != map.length)
            throw new IllegalArgumentException("Arguments should be <String> key - <?> value pairs");

        Builder builder = new Builder();
        for (int i = 0; i < map.length; i += 2)
            builder.put((String)map[i], map[i + 1]);

        return builder.build();
    }