interface Map
source · line 7public
public interface Map<K, V> : IndexGet<K, V?>, Contains<K>, Iterable<Map.Entry<K, V>>
- Supertype
IndexGet<K, Option<V>> - Supertype
Contains<K> - Supertype
Iterable<Map.Entry<K, V>> - Inherited
operator fun iterator(): Iterator<Map.Entry<K, V>>· Iterable<Map.Entry<K, V>>
Read access to key-value associations. Missing keys return None; iteration and views expose entries in the implementation's order.
Extensions
public fun <K, V> Map<K, V>.toMutableMap(): MutableMap<K, V> where K : Equals<K>, K : Hash· scoop:scoop.std:0.1.0public fun <K : Compare<K>, V> Map<K, V>.toSortedMap(): SortedMap<K, V>· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.getOrDefault(key: K, defaultValue: V): V· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.getValue(key: K): V· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.toMap(): Map<K, V> where K : Equals<K>, K : Hash· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.getOrElse(key: K, defaultValue: () -> V): V· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.isEmpty(): Boolean· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.toSortedMap(comparator: Comparator<K>): SortedMap<K, V>· scoop:scoop.std:0.1.0public fun <K, V> Map<K, V>.isNotEmpty(): Boolean· scoop:scoop.std:0.1.0public fun <K, V : Equals<V>> Map<K, V>.containsValue(value: V): Boolean· scoop:scoop.std:0.1.0
property entries
source · line 35public
public val entries: Collection<Map.Entry<K, V>>
get: public read-only
A read-only view of current key-value entries.
type parameter K
source · line 7public
K
type parameter V
source · line 7public
V
function contains
source · line 23public
public override operator fun contains(value: K): Boolean
- Overrides
contains
Tests key membership, not value membership.
parameter value
source · line 23public
value: K
function get
source · line 15public
public override operator fun get(key: K): V?
- Overrides
get
Returns the value associated with the key, or None when absent.
parameter key
source · line 15public
key: K
property values
source · line 31public
public val values: Collection<V>
get: public read-only
A read-only view of current values, retaining duplicates.
property keys
source · line 27public
public val keys: Set<K>
get: public read-only
A read-only view of the map's current keys.
property size
source · line 11public
public val size: Long
get: public read-only
The number of key-value associations.
function containsKey
source · line 19public
public fun containsKey(key: K): Boolean
Tests whether the key has an association.
parameter key
source · line 19public
key: K