LongSparseArrayKt

public final class LongSparseArrayKt


Summary

Public fields

final int

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

Public methods

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

Returns true if the collection contains key.

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

Returns true if the collection contains key.

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

Returns true if the collection contains value.

static final @RequiresApi(value = "16") 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.

static final @RequiresApi(value = "16") @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.

static final @RequiresApi(value = "16") @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.

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

Return true when the collection contains no elements.

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

Return true when the collection contains elements.

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

Return an iterator over the collection's keys.

static final @RequiresApi(value = "16") @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.

static final @RequiresApi(value = "16") 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.

static final @RequiresApi(value = "16") 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.

static final @RequiresApi(value = "16") 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.

static final @RequiresApi(value = "16") @NonNull Iterator<@NonNull T>

Return an iterator over the collection's values.

Public fields

size

@NonNull
public final int size

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

Public methods

LongSparseArrayKt.contains

@RequiresApi(value = "16")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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.isEmpty

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

Return true when the collection contains no elements.

LongSparseArrayKt.isNotEmpty

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

Return true when the collection contains elements.

LongSparseArrayKt.keyIterator

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

Return an iterator over the collection's keys.

LongSparseArrayKt.plus

@RequiresApi(value = "16")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") 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")
@NonNull
public static final @RequiresApi(value = "16") Iterator<@NonNull T> <T extends Object> LongSparseArrayKt.valueIterator(
    @NonNull LongSparseArray<@NonNull T> receiver
)

Return an iterator over the collection's values.