MutableListMap

interface MutableListMap<K, V> : ListMap<K, V>

Mutable version of the immutable type ListMap

Implementations of this interface should be thread safe.

Author

Elizabeth Paige Harper https://github.com/Foxcapades

Since

v0.3.0

Parameters

K

Type of the keys in this ListMap

V

Type of the values in the lists in this ListMap

Functions

Link copied to clipboard
abstract fun add(values: Map<K, Iterable<V>>)
abstract fun add(key: K, vararg values: V)
abstract fun add(key: K, values: Iterable<V>)

Adds the given values to this MutableListMap.

abstract fun add(key: K, value: V)

Adds the given value to this MutableListMap.

Link copied to clipboard
abstract operator fun contains(key: K): Boolean

Tests whether this ListMap contains the given key.

Link copied to clipboard
open fun forEach(p0: Consumer<in Pair<K, List<V>>>)
Link copied to clipboard
abstract operator fun get(key: K): List<V>?

Retrieves the list of values at the given key in this ListMap.

Link copied to clipboard
abstract operator fun iterator(): Iterator<Pair<K, List<V>>>
Link copied to clipboard
abstract fun set(values: Map<K, Iterable<V>>)
abstract fun set(key: K, vararg values: V)
abstract fun set(key: K, values: Iterable<V>)

Sets the given values to this MutableListMap.

abstract fun set(key: K, value: V)

Sets the given value to this MutableListMap.

Link copied to clipboard
Link copied to clipboard
abstract fun stream(): Stream<Pair<K, List<V>>>
Link copied to clipboard
abstract fun toImmutable(): ListMap<K, V>

Creates and returns an immutable ListMap copy of this MutableListMap.

Link copied to clipboard
abstract fun toMap(): Map<K, List<V>>

Properties

Link copied to clipboard
abstract val isEmpty: Boolean

Whether this ListMap is empty.

Link copied to clipboard
abstract val isNotEmpty: Boolean

Whether this ListMap is not empty.

Link copied to clipboard
abstract val size: UInt

Number of lists in this ListMap.

Link copied to clipboard
abstract val totalSize: UInt

Total number of values in all lists in this ListMap.

Inheritors

Link copied to clipboard
Link copied to clipboard