MultiMap

interface MultiMap<K, V> : Map<K, List<V>>

A collection similar to a Map except it allows multiple values to be associated with a single key. The associated values are not necessarily distinct (e.g., key foo may be associated with value bar multiple times).

Parameters

K

The type of elements used as keys

V

The type of elements used as values

Inheritors

Properties

Link copied to clipboard
abstract val entryValues: <Error class: unknown class><Map.Entry<K, V>>

Gets a Sequence of key-value pairs. A given key will appear multiple times in the sequence if it is associated with multiple values.

Inherited properties

Link copied to clipboard
abstract val entries: Set<Map.Entry<K, List<V>>>
Link copied to clipboard
abstract val keys: Set<K>
Link copied to clipboard
abstract val size: Int
Link copied to clipboard
abstract val values: Collection<List<V>>

Functions

Link copied to clipboard
open fun contains(key: K, value: V): Boolean

Checks if the specified value is present for the given key. Returns false if key is not present or if it is not associated with value.

Link copied to clipboard

Returns a mutable copy of this multimap. Changes to the returned mutable multimap do not affect this instance.

Inherited functions

Link copied to clipboard
abstract fun containsKey(key: K): Boolean
Link copied to clipboard
abstract fun containsValue(value: List<V>): Boolean
Link copied to clipboard
abstract operator fun get(key: K): List<V>?
Link copied to clipboard
abstract fun isEmpty(): Boolean