NotEmptyMap

@Serializable(with = NotEmptyMapSerializer::class)
@SinceKotoolsTypes(version = "4.0")
value class NotEmptyMap<K, out V>

Represents a map with at least one entry with a key of type K and a value of type V.

You can use the notEmptyMapOf or the toNotEmptyMap functions for building this type.

Functions

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

Returns all entries of this map as a Map with keys of type K and values of type V.

Link copied to clipboard
open override fun toString(): String

Returns the string representation of this map.

Properties

Link copied to clipboard

All entries of this map.

Link copied to clipboard
val head: Pair<K, V>

The first entry of this map.

Link copied to clipboard

All keys of this map.

Link copied to clipboard

The size of this map.

Link copied to clipboard

All entries of this map except the first one.

Link copied to clipboard

All values of this map.