SparseBooleanArrayKt

public final class SparseBooleanArrayKt


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
SparseBooleanArrayKt.containsValue(
    SparseBooleanArray receiver,
    boolean value
)

Returns true if the collection contains value.

static final void
SparseBooleanArrayKt.forEach(
    SparseBooleanArray receiver,
    Function2<IntegerBooleanUnit> action
)

Performs the given action for each key/value entry.

static final boolean
SparseBooleanArrayKt.getOrDefault(
    SparseBooleanArray receiver,
    int key,
    boolean defaultValue
)

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

static final boolean
SparseBooleanArrayKt.getOrElse(
    SparseBooleanArray receiver,
    int key,
    Function0<Boolean> 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 SparseBooleanArray

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
SparseBooleanArrayKt.remove(
    SparseBooleanArray receiver,
    int key,
    boolean value
)

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

static final void
SparseBooleanArrayKt.set(
    SparseBooleanArray receiver,
    int key,
    boolean value
)

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

static final @NonNull BooleanIterator

Return an iterator over the collection's values.

Public fields

size

public final int size

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

Public methods

SparseBooleanArrayKt.contains

public static final boolean SparseBooleanArrayKt.contains(SparseBooleanArray receiver, int key)

Returns true if the collection contains key.

SparseBooleanArrayKt.containsKey

public static final boolean SparseBooleanArrayKt.containsKey(SparseBooleanArray receiver, int key)

Returns true if the collection contains key.

SparseBooleanArrayKt.containsValue

public static final boolean SparseBooleanArrayKt.containsValue(
    SparseBooleanArray receiver,
    boolean value
)

Returns true if the collection contains value.

SparseBooleanArrayKt.forEach

public static final void SparseBooleanArrayKt.forEach(
    SparseBooleanArray receiver,
    Function2<IntegerBooleanUnit> action
)

Performs the given action for each key/value entry.

SparseBooleanArrayKt.getOrDefault

public static final boolean SparseBooleanArrayKt.getOrDefault(
    SparseBooleanArray receiver,
    int key,
    boolean defaultValue
)

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

SparseBooleanArrayKt.getOrElse

public static final boolean SparseBooleanArrayKt.getOrElse(
    SparseBooleanArray receiver,
    int key,
    Function0<Boolean> defaultValue
)

Return the value c