computeIfAbsent

fun computeIfAbsent(key: Key, block: () -> Value): Value(source)

Computes block and inserts the result in the map under key if key does not yet have a mapping. The block will be evaluated at most once.