Adds a value to the list of values associated with the specified key. If the key does not exist, it will be created. @param key the key to which the value will be added @param value the value to add
(K key, V value)
| 27 | * @param value the value to add |
| 28 | */ |
| 29 | public void put(K key, V value) { |
| 30 | map.computeIfAbsent(Objects.requireNonNull(key), k -> new ArrayList<>()).add(Objects.requireNonNull(value)); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Returns a list of values associated with the specified key. |