typealias HashMap<K, V> = HashMap<K, V>
Platform and version requirements: Kotlin 1.1, JVM
open class HashMap<K, V> : AbstractMutableMap<K, V>
Platform and version requirements: JS
Hash table based implementation of the MutableMap interface.
This implementation makes no guarantees regarding the order of enumeration of keys, values and entries collections.
HashMap() HashMap(initialCapacity: Int, loadFactor: Float = 0f) Constructs an empty HashMap instance. HashMap(original: Map<out K, V>) Constructs an instance of HashMap filled with the contents of the specified original map. |
open val entries: MutableSet<MutableEntry<K, V>> Returns a read-only Set of all key/value pairs in this map. | |
open val size: Int Returns the number of key/value pairs in the map. |
open val keys: MutableSet<K> Returns a read-only Set of all keys in this map. | |
open val values: MutableCollection<V> Returns a read-only Collection of all values in this map. Note that this collection may contain duplicate values. |
open fun clear() Removes all elements from this map. | |
open fun containsKey(key: K): Boolean Returns | |
open fun containsValue(value: V): Boolean Returns | |
open fun createEntrySet(): MutableSet<MutableEntry<K, V>> | |
open operator fun get(key: K): V? Returns the value corresponding to the given key, or | |
open fun put(key: K, value: V): V? Associates the specified value with the specified key in the map. | |
open fun remove(key: K): V? Removes the specified key and its corresponding value from this map. |
open fun putAll(from: Map<out K, V>) Updates this map with key/value pairs from the specified map from. |
© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-hash-map/index.html