core-ktx / androidx.util / android.util.LongSparseArray / getOrElse

getOrElse

inline fun <T> LongSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T): T

Return the value corresponding to key, or from defaultValue when not present.