SparseLongArrayKt

public final class SparseLongArrayKt


Summary

Public fields

final int

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

Public methods

static final @RequiresApi(value = 18) boolean

Returns true if the collection contains key.

static final @RequiresApi(value = 18) boolean

Returns true if the collection contains key.

static final @RequiresApi(value = 18) boolean

Returns true if the collection contains value.

static final @RequiresApi(value = 18) void
SparseLongArrayKt.forEach(
    SparseLongArray receiver,
    Function2<IntegerLongUnit> action
)

Performs the given action for each key/value entry.

static final @RequiresApi(value = 18) long
SparseLongArrayKt.getOrDefault(
    SparseLongArray receiver,
    int key,
    long defaultValue
)

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

static final @RequiresApi(value = 18) long
SparseLongArrayKt.getOrElse(
    SparseLongArray receiver,
    int key,
    Function0<Long> defaultValue
)

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

static final @RequiresApi(value = 18) boolean

Return true when the collection contains no elements.

static final @RequiresApi(value = 18) boolean

Return true when the collection contains elements.

static final @RequiresApi(value = 18) @NonNull IntIterator

Return an iterator over the collection's keys.

static final @RequiresApi(value = 18) @NonNull SparseLongArray
SparseLongArrayKt.plus(
    SparseLongArray receiver,
    SparseLongArray other
)

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

static final @RequiresApi(value = 18) void
SparseLongArrayKt.putAll(
    SparseLongArray receiver,
    SparseLongArray other
)

Update this collection by adding or replacing entries from other.

static final @RequiresApi(value = 18) boolean
SparseLongArrayKt.remove(SparseLongArray receiver, int key, long value)

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

static final @RequiresApi(value = 18) void
SparseLongArrayKt.set(SparseLongArray receiver, int key, long value)

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

static final @RequiresApi(value = 18) @NonNull LongIterator

Return an iterator over the collection's values.

Public fields

size

public final int size

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

Public methods

SparseLongArrayKt.contains

@RequiresApi(value = 18)
public static final boolean SparseLongArrayKt.contains(SparseLongArray receiver, int key)

Returns true if the collection contains key.

SparseLongArrayKt.containsKey

@RequiresApi(value = 18)
public static final boolean SparseLongArrayKt.containsKey(SparseLongArray receiver, int key)

Returns true if the collection contains key.

SparseLongArrayKt.containsValue

@RequiresApi(value = 18)
public static final boolean SparseLongArrayKt.containsValue(SparseLongArray receiver, long value)

Returns true if the collection contains value.

SparseLongArrayKt.forEach

@RequiresApi(value = 18)
public static final void SparseLongArrayKt.forEach(
    SparseLongArray receiver,
    Function2<IntegerLongUnit> action
)

Performs the given action for each key/value entry.

SparseLongArrayKt.getOrDefault

@RequiresApi(value = 18)
public static final long SparseLongArrayKt.getOrDefault(
    SparseLongArray receiver,
    int key,
    long defaultValue
)

Return the value corresponding to key, or