AbstractMap

abstract class AbstractMap<K, out V> : Map<K, V>

Provides a skeletal implementation of the read-only Map interface.

The implementor is required to implement entries property, which should return read-only set of map entries.

Since Kotlin

1.1

Parameters

K

the type of map keys. The map is invariant in its key type.

V

the type of map values. The map is covariant in its value type.

Functions

containsKey
Link copied to clipboard
open override fun containsKey(key: K): Boolean
containsValue
Link copied to clipboard
open override fun containsValue(value: @UnsafeVariance V): Boolean
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compares this map with other instance with the ordered structural equality.

get
Link copied to clipboard
open operator override fun get(key: K): V?
hashCode
Link copied to clipboard
open override fun hashCode(): Int

Returns the hash code value for this map.

isEmpty
Link copied to clipboard
open override fun isEmpty(): Boolean
toString
Link copied to clipboard
open override fun toString(): String
fun toString(entry: Map.Entry<K, V>): String

Properties

_values
Link copied to clipboard
var _values: Collection<V>? = null
entries
Link copied to clipboard
abstract val entries: Set<Map.Entry<K, V>>
keys
Link copied to clipboard
open override val keys: Set<K>

Returns a read-only Set of all keys in this map.

size
Link copied to clipboard
open override val size: Int
values
Link copied to clipboard
open override val values: Collection<V>

Returns a read-only Collection of all values in this map.

Inheritors

AbstractMutableMap
Link copied to clipboard