mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
19 lines
313 B
Kotlin
Vendored
19 lines
313 B
Kotlin
Vendored
package android.util
|
|
|
|
class SparseArray<E : Any> {
|
|
private val map = HashMap<Int, E>()
|
|
|
|
fun get(key: Int): E? {
|
|
return map.get(key)
|
|
}
|
|
|
|
fun put(key: Int, value: E) {
|
|
map.put(key, value)
|
|
}
|
|
|
|
fun remove(key: Int): E? {
|
|
return map.remove(key)
|
|
}
|
|
|
|
fun clear() {}
|
|
} |