{% setvar book_path %}/reference/kotlin/commonMain/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
FooSparseArray |
SparseArray mapping longs to Objects. |
Cmn
|
inline operator Boolean |
<T : Any?> FooSparseArray<T>.contains(key: Long) Returns true if the collection contains |
Cmn
|
inline Unit |
<T : Any?> FooSparseArray<T>.forEach(action: (key: Long, value) -> Unit) Performs the given |
Cmn
|
inline T |
<T : Any?> FooSparseArray<T>.getOrDefault(key: Long, defaultValue: T) Return the value corresponding to |
Cmn
|
inline T |
<T : Any?> FooSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T) Return the value corresponding to |
Cmn
|
inline Boolean |
<T : Any?> FooSparseArray<T>.isNotEmpty() Return true when the collection contains elements. |
Cmn
|
LongIterator |
<T : Any?> FooSparseArray<T>.keyIterator() Return an iterator over the collection's keys. |
Cmn
|
inline operator Unit |
<T : Any?> FooSparseArray<T>.set(key: Long, value: T) Allows the use of the index operator for storing values in the collection. |
Cmn
|
Iterator<T> |
<T : Any?> FooSparseArray<T>.valueIterator() Return an iterator over the collection's values. |
Cmn
|
Int |
Returns the number of key/value pairs in the collection. |
Cmn
|
inline operator fun <T : Any?> FooSparseArray<T>.contains(key: Long): Boolean
Returns true if the collection contains key
.
inline fun <T : Any?> FooSparseArray<T>.forEach(action: (key: Long, value) -> Unit): Unit
Performs the given action
for each key/value entry.
inline fun <T : Any?> FooSparseArray<T>.getOrDefault(key: Long, defaultValue: T): T
Return the value corresponding to key
, or defaultValue
when not present.
inline fun <T : Any?> FooSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T): T
Return the value corresponding to key
, or from defaultValue
when not present.
inline fun <T : Any?> FooSparseArray<T>.isNotEmpty(): Boolean
Return true when the collection contains elements.
fun <T : Any?> FooSparseArray<T>.keyIterator(): LongIterator
Return an iterator over the collection's keys.
inline operator fun <T : Any?> FooSparseArray<T>.set(key: Long, value: T): Unit
Allows the use of the index operator for storing values in the collection.
fun <T : Any?> FooSparseArray<T>.valueIterator(): Iterator<T>
Return an iterator over the collection's values.