LongSparseArrayKt

public final class LongSparseArrayKt


Summary

Public fields

final int

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

Public methods

static final boolean
<T extends Object> LongSparseArrayKt.contains(
    LongSparseArray<T> receiver,
    long key
)

Returns true if the collection contains key.

static final void
<T extends Object> LongSparseArrayKt.forEach(
    LongSparseArray<T> receiver,
    Function2<Long, value, Unit> action
)

Performs the given action for each key/value entry.

static final @NonNull T
<T extends Object> LongSparseArrayKt.getOrDefault(
    LongSparseArray<T> receiver,
    long key,
    T defaultValue
)

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

static final @NonNull T
<T extends Object> LongSparseArrayKt.getOrElse(
    LongSparseArray<T> receiver,
    long key,
    Function0<T> defaultValue
)

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

static final boolean

Return true when the collection contains elements.

static final @NonNull LongIterator

Return an iterator over the collection's keys.

static final @NonNull LongSparseArray<@NonNull T>
<T extends Object> LongSparseArrayKt.plus(
    LongSparseArray<T> receiver,
    LongSparseArray<T> other
)

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

static final boolean