Android Extensions: Add SparseArray implementation for the View cache (KT-18250)
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
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() {}
|
||||
}
|
||||
Reference in New Issue
Block a user