core-ktx / androidx.util / arrayMapOf

arrayMapOf

inline fun <K, V> arrayMapOf(): ArrayMap<K, V>

Returns an empty new ArrayMap.

fun <K, V> arrayMapOf(vararg pairs: Pair<K, V>): ArrayMap<K, V>

Returns a new ArrayMap with the specified contents, given as a list of pairs where the first component is the key and the second component is the value.

If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.