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

SparseLongArrayKt

public final class SparseLongArrayKt


Summary

Public methods

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

Returns true if the collection contains key.

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

Returns true if the collection contains key.

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

Returns true if the collection contains value.

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

Performs the given action for each key/value entry.

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

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

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

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

static final int

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

static final boolean

Return true when the collection contains no elements.

static final boolean

Return true when the collection contains elements.

static final @NonNull IntIterator

Return an iterator over the collection's keys.

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

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

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

Update this collection by adding or replacing entries from other.

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

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

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

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

static final @NonNull LongIterator

Return an iterator over the collection's values.

Public methods

SparseLongArrayKt.contains

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

Returns true if the collection contains key.

SparseLongArrayKt.containsKey

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

Returns true if the collection contains key.

SparseLongArrayKt.containsValue

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

Returns true if the collection contains value.

SparseLongArrayKt.forEach

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

Performs the given action for each key/value entry.

SparseLongArrayKt.getOrDefault

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

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

SparseLongArrayKt.getOrElse

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

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

SparseLongArrayKt.getSize

@RequiresApi(value = 18)
public static final int SparseLongArrayKt.getSize(@NonNull SparseLongArray receiver)

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

SparseLongArrayKt.isEmpty

@RequiresApi(value = 18)
public static final boolean SparseLongArrayKt.isEmpty(@NonNull SparseLongArray receiver)

Return true when the collection contains no elements.

SparseLongArrayKt.isNotEmpty

@RequiresApi(value = 18)
public static final boolean SparseLongArrayKt.isNotEmpty(@NonNull SparseLongArray receiver)

Return true when the collection contains elements.

SparseLongArrayKt.keyIterator

@RequiresApi(value = 18)
public static final @NonNull IntIterator SparseLongArrayKt.keyIterator(@NonNull SparseLongArray receiver)

Return an iterator over the collection's keys.

SparseLongArrayKt.plus

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

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

SparseLongArrayKt.putAll

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

Update this collection by adding or replacing entries from other.

SparseLongArrayKt.remove

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

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

SparseLongArrayKt.set

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

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

SparseLongArrayKt.valueIterator

@RequiresApi(value = 18)
public static final @NonNull LongIterator SparseLongArrayKt.valueIterator(@NonNull SparseLongArray receiver)

Return an iterator over the collection's values.