mapOfNotNull

fun <K, V> mapOfNotNull(vararg mapping: Pair<K?, V?>): Map<K, V>

Create a new read-only map from a list of pairs, if both values in the pair are not null.

Return

map with the provided keys and values, excluding nulls

See also

Parameters

mapping

pairs of keys and values to put into the map