Stay organized with collections Save and categorize content based on your preferences.

LongSparseArrayKt

public final class LongSparseArrayKt


Summary

Public methods

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.contains(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key
)

Returns true if the collection contains key.

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.containsKey(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key
)

Returns true if the collection contains key.

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.containsValue(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull T value
)

Returns true if the collection contains value.

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

Performs the given action for each key/value entry.

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

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

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

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

static final int

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

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.isEmpty(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return true when the collection contains no elements.

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.isNotEmpty(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return true when the collection contains elements.

static final @NonNull LongIterator
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.keyIterator(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return an iterator over the collection's keys.

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

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

static final void
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.putAll(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull LongSparseArray<@NonNull T> other
)

Update this collection by adding or replacing entries from other.

static final boolean
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.remove(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key,
    @NonNull T value
)

Removes the entry for key only if it is mapped to value.

static final void
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.set(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key,
    @NonNull T value
)

Allows the use of the index operator for storing values in the collection.

static final @NonNull Iterator<@NonNull T>
@RequiresApi(value = 16)
<T extends Object> LongSparseArrayKt.valueIterator(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return an iterator over the collection's values.

Public methods

LongSparseArrayKt.contains

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.contains(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key
)

Returns true if the collection contains key.

LongSparseArrayKt.containsKey

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.containsKey(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key
)

Returns true if the collection contains key.

LongSparseArrayKt.containsValue

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.containsValue(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull T value
)

Returns true if the collection contains value.

LongSparseArrayKt.forEach

@RequiresApi(value = 16)
public static final void <T extends Object> LongSparseArrayKt.forEach(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull Function2<@NonNull Long, @NonNull value, Unit> action
)

Performs the given action for each key/value entry.

LongSparseArrayKt.getOrDefault

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

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

LongSparseArrayKt.getOrElse

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

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

LongSparseArrayKt.getSize

@RequiresApi(value = 16)
public static final int LongSparseArrayKt.getSize(@NonNull LongSparseArray<@NonNull T> receiver)

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

LongSparseArrayKt.isEmpty

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.isEmpty(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return true when the collection contains no elements.

LongSparseArrayKt.isNotEmpty

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.isNotEmpty(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return true when the collection contains elements.

LongSparseArrayKt.keyIterator

@RequiresApi(value = 16)
public static final @NonNull LongIterator <T extends Object> LongSparseArrayKt.keyIterator(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return an iterator over the collection's keys.

LongSparseArrayKt.plus

@RequiresApi(value = 16)
public static final @NonNull LongSparseArray<@NonNull T> <T extends Object> LongSparseArrayKt.plus(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull LongSparseArray<@NonNull T> other
)

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

LongSparseArrayKt.putAll

@RequiresApi(value = 16)
public static final void <T extends Object> LongSparseArrayKt.putAll(
    @NonNull LongSparseArray<@NonNull T> receiver,
    @NonNull LongSparseArray<@NonNull T> other
)

Update this collection by adding or replacing entries from other.

LongSparseArrayKt.remove

@RequiresApi(value = 16)
public static final boolean <T extends Object> LongSparseArrayKt.remove(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key,
    @NonNull T value
)

Removes the entry for key only if it is mapped to value.

LongSparseArrayKt.set

@RequiresApi(value = 16)
public static final void <T extends Object> LongSparseArrayKt.set(
    @NonNull LongSparseArray<@NonNull T> receiver,
    long key,
    @NonNull T value
)

Allows the use of the index operator for storing values in the collection.

LongSparseArrayKt.valueIterator

@RequiresApi(value = 16)
public static final @NonNull Iterator<@NonNull T> <T extends Object> LongSparseArrayKt.valueIterator(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return an iterator over the collection's values.