SparseIntArrayKt

public final class SparseIntArrayKt


Summary

Public fields

final int

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

Public methods

static final boolean

Returns true if the collection contains key.

static final boolean

Returns true if the collection contains key.

static final boolean
SparseIntArrayKt.containsValue(
    @NonNull SparseIntArray receiver,
    int value
)

Returns true if the collection contains value.

static final void
SparseIntArrayKt.forEach(
    @NonNull SparseIntArray receiver,
    @NonNull Function2<@NonNull Integer, @NonNull IntegerUnit> action
)

Performs the given action for each key/value entry.

static final int
SparseIntArrayKt.getOrDefault(
    @NonNull SparseIntArray receiver,
    int key,
    int defaultValue
)

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

static final int
SparseIntArrayKt.getOrElse(
    @NonNull SparseIntArray receiver,
    int key,
    @NonNull Function0<@NonNull Integer> defaultValue
)

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

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 SparseIntArray

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

static final void

Update this collection by adding or replacing entries from other.

static final boolean
SparseIntArrayKt.remove(
    @NonNull SparseIntArray receiver,
    int key,
    int value
)

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

static final void
SparseIntArrayKt.set(
    @NonNull SparseIntArray receiver,
    int key,
    int value
)

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

static final @NonNull IntIterator

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

SparseIntArrayKt.contains

@NonNull
public static final boolean SparseIntArrayKt.contains(@NonNull SparseIntArray receiver, int key)

Returns true if the collection contains key.

SparseIntArrayKt.containsKey

@NonNull
public static final boolean SparseIntArrayKt.containsKey(@NonNull SparseIntArray receiver, int key)

Returns true if the collection contains key.

SparseIntArrayKt.containsValue

@NonNull
public static final boolean SparseIntArrayKt.containsValue(
    @NonNull SparseIntArray receiver,
    int value
)

Returns true if the collection contains value.

SparseIntArrayKt.forEach

@NonNull
public static final void SparseIntArrayKt.forEach(
    @NonNull SparseIntArray receiver,
    @NonNull Function2<@NonNull Integer, @NonNull IntegerUnit> action
)

Performs the given action for each key/value entry.

SparseIntArrayKt.getOrDefault

@NonNull
public static final int SparseIntArrayKt.getOrDefault(
    @NonNull SparseIntArray receiver,
    int key,
    int defaultValue
)

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

SparseIntArrayKt.getOrElse

@NonNull
public static final int SparseIntArrayKt.getOrElse(
    @NonNull SparseIntArray receiver,
    int key,
    @NonNull Function0<@NonNull Integer> defaultValue
)

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

SparseIntArrayKt.isEmpty

@NonNull
public static final boolean SparseIntArrayKt.isEmpty(@NonNull SparseIntArray receiver)

Return true when the collection contains no elements.

SparseIntArrayKt.isNotEmpty

@NonNull
public static final boolean SparseIntArrayKt.isNotEmpty(@NonNull SparseIntArray receiver)

Return true when the collection contains elements.

SparseIntArrayKt.keyIterator

@NonNull
public static final IntIterator SparseIntArrayKt.keyIterator(@NonNull SparseIntArray receiver)

Return an iterator over the collection's keys.

SparseIntArrayKt.plus

@NonNull
public static final SparseIntArray SparseIntArrayKt.plus(
    @NonNull SparseIntArray receiver,
    @NonNull SparseIntArray other
)

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

SparseIntArrayKt.putAll

@NonNull
public static final void SparseIntArrayKt.putAll(
    @NonNull SparseIntArray receiver,
    @NonNull SparseIntArray other
)

Update this collection by adding or replacing entries from other.

SparseIntArrayKt.remove

@NonNull
public static final boolean SparseIntArrayKt.remove(
    @NonNull SparseIntArray receiver,
    int key,
    int value
)

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

SparseIntArrayKt.set

@NonNull
public static final void SparseIntArrayKt.set(
    @NonNull SparseIntArray receiver,
    int key,
    int value
)

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

SparseIntArrayKt.valueIterator

@NonNull
public static final IntIterator SparseIntArrayKt.valueIterator(@NonNull SparseIntArray receiver)

Return an iterator over the collection's values.