addAll

abstract fun addAll(key: K, values: Collection<V>): Boolean

Adds associations from the given key to the given values. This will append to the existing associations, not merge or deduplicate. This operation copies from the given values. Later changes to the collection do not affect this instance.

Return

True because the multimap is always modified as the result of this operation

Parameters

key

The key to associate

values

The values to associate


abstract fun addAll(key: K, index: Int, values: Collection<V>): Boolean

Adds associations from the given key to the given values, inserting them at the given index in the list of values already associated with the key. This operation copies from the given values. Later changes to the collection do not affect this instance.

Return

True because the multimap is always modified as the result of this operation

Parameters

key

The key to associate

index

The index at which to insert values in the list of associated values

values

The values to associate


open fun addAll(other: Map<K, List<V>>)

Adds all the key-value associations from another map into this one. This will append to the existing associations, not merge or deduplicate. This operation copies from the given values lists. Later changes to those lists do not affect this collection.

Parameters

other

The other map from which to copy values