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

getOrDefault

inline fun <T> SparseArray<T>.getOrDefault(key: Int, defaultValue: T): T

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