Add given values for the given key. If this map already contains some of the values, they will be ignored. If values contains duplicates, only the first of them will be added.
(K key, Collection<V> values)
| 52 | * <p>If {@code values} contains duplicates, only the first of them will be added. |
| 53 | */ |
| 54 | public Multimap<K, V> putAll(K key, Collection<V> values) { |
| 55 | map.computeIfAbsent(key, __ -> new LinkedHashSet<>()).addAll(values); |
| 56 | return this; |
| 57 | } |
| 58 | |
| 59 | public boolean isEmpty() { |
| 60 | return map.isEmpty(); |