{% setvar book_path %}/reference/kotlin/dokkatest/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

androidx.collection

Classes

FooSparseArray

SparseArray mapping longs to Objects.

Cmn
android
N

Top-level functions summary

Int
android
Int
N
Int
android
Int
N
Int
N

Extension functions summary

inline operator Boolean
<T : Any?> FooSparseArray<T>.contains(key: Long)

Returns true if the collection contains key.

Cmn
inline Unit
<T : Any?> FooSparseArray<T>.forEach(action: (key: Long, value) -> Unit)

Performs the given action for each key/value entry.

Cmn
inline T
<T : Any?> FooSparseArray<T>.getOrDefault(key: Long, defaultValue: T)

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

Cmn
inline T
<T : Any?> FooSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T)

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

Cmn
inline Boolean

Return true when the collection contains elements.

Cmn
Int
JS
LongIterator

Return an iterator over the collection's keys.

Cmn
operator FooSparseArray<T>
<T : Any?> FooSparseArray<T>.plus(other: FooSparseArray<T>)

Creates a new collection by adding or replacing entries from other.

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>

Return an iterator over the collection's values.

Cmn

Extension properties summary

Int

Returns the number of key/value pairs in the collection.

Cmn

Top-level functions

functionThatExistsInMultipleSourceSetsButNotCommon

fun functionThatExistsInMultipleSourceSetsButNotCommon(foo: String): Int

functionThatExistsInMultipleSourceSetsButNotCommon

fun functionThatExistsInMultipleSourceSetsButNotCommon(foo: String): Int

functionWithSameNameInMultipleSourceSetsButDifferentParams

fun functionWithSameNameInMultipleSourceSetsButDifferentParams(
    fooJVM: String
): Int

functionWithSameNameInMultipleSourceSetsButDifferentParams

fun functionWithSameNameInMultipleSourceSetsButDifferentParams(
    fooNATIVE: String
): Int

nativeOnlyFunction

fun nativeOnlyFunction(): Int

Extension functions

contains

inline operator fun <T : Any?> FooSparseArray<T>.contains(key: Long): Boolean

Returns true if the collection contains key.

forEach

inline fun <T : Any?> FooSparseArray<T>.forEach(action: (key: Long, value) -> Unit): Unit

Performs the given action for each key/value entry.

getOrDefault

inline fun <T : Any?> FooSparseArray<T>.getOrDefault(key: Long, defaultValue: T): T

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

getOrElse

inline fun <T : Any?> FooSparseArray<T>.getOrElse(key: Long, defaultValue: () -> T): T

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

isNotEmpty

inline fun <T : Any?> FooSparseArray<T>.isNotEmpty(): Boolean

Return true when the collection contains elements.

jsOnlyExtensionFunction

fun <T : Any?> FooSparseArray<T>.jsOnlyExtensionFunction(): Int

keyIterator

fun <T : Any?> FooSparseArray<T>.keyIterator(): LongIterator

Return an iterator over the collection's keys.

plus

operator fun <T : Any?> FooSparseArray<T>.plus(other: FooSparseArray<T>): FooSparseArray<T>

Creates a new collection by adding or replacing entries from other.

set

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.

valueIterator

fun <T : Any?> FooSparseArray<T>.valueIterator(): Iterator<T>

Return an iterator over the collection's values.

Extension properties

size

val FooSparseArray<T>.sizeInt

Returns the number of key/value pairs in the collection.