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

getOrDefault

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

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