ListMap

interface ListMap<K, V> : Iterable<Pair<K, List<V>>>

Immutable map of keys to lists of values.

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 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
Link copied to clipboard
abstract fun stream(): Stream<Pair<K, List<V>>>
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
Link copied to clipboard