operator fun <T> SparseArray<T>.contains(key: Int): Boolean
Returns true if the collection contains key. |
|
fun <T> SparseArray<T>.containsKey(key: Int): Boolean
Returns true if the collection contains key. |
|
fun <T> SparseArray<T>.containsValue(value: T): Boolean
Returns true if the collection contains value. |
|
fun <T> SparseArray<T>.forEach(action: (key: Int, value: T) -> Unit): Unit
Performs the given action for each key/value entry. |
|
fun <T> SparseArray<T>.getOrDefault(key: Int, defaultValue: T): T
Return the value corresponding to key, or defaultValue when not present. |
|
fun <T> SparseArray<T>.getOrElse(key: Int, defaultValue: () -> T): T
Return the value corresponding to key, or from defaultValue when not present. |
|
fun <T> SparseArray<T>.isEmpty(): Boolean
Return true when the collection contains no elements. |
|
fun <T> SparseArray<T>.isNotEmpty(): Boolean
Return true when the collection contains elements. |
|
fun <T> SparseArray<T>.keyIterator(): IntIterator
Return an iterator over the collection's keys. |
|
operator fun <T> SparseArray<T>.plus(other: SparseArray<T>): SparseArray<T>
Creates a new collection by adding or replacing entries from other. |
|
fun <T> SparseArray<T>.putAll(other: SparseArray<T>): Unit
Update this collection by adding or replacing entries from other. |
|
fun <T> SparseArray<T>.remove(key: Int, value: T): Boolean
|
|
operator fun <T> SparseArray<T>.set(key: Int, value: T): Unit
Allows the use of the index operator for storing values in the collection. |
|
val <T> SparseArray<T>.size: Int
Returns the number of key/value pairs in the collection. |
|
fun <T> SparseArray<T>.valueIterator(): Iterator<T>
Return an iterator over the collection's values. |