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
SparseBooleanArrayKt.contains(
    @NonNull SparseBooleanArray receiver,
    int key
)

Returns true if the collection contains key.

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

Returns true if the collection contains key.

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

Returns true if the collection contains value.

static final void
SparseBooleanArrayKt.forEach(
    @NonNull SparseBooleanArray receiver,
    @NonNull Function2<@NonNull Integer, @NonNull BooleanUnit> action
)

Performs the given action for each key/value entry.

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

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

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

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

static final void
SparseBooleanArrayKt.set(
    @NonNull 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

@NonNull
public final int size

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

Public methods

SparseBooleanArrayKt.contains

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

Returns true if the collection contains key.

SparseBooleanArrayKt.containsKey

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

Returns true if the collection contains key.

SparseBooleanArrayKt.containsValue

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

Returns true if the collection contains value.

SparseBooleanArrayKt.forEach

@NonNull
public static final void SparseBooleanArrayKt.forEach(
    @NonNull SparseBooleanArray receiver,
    @NonNull Function2<@NonNull Integer, @NonNull BooleanUnit> action
)

Performs the given action for each key/value entry.

SparseBooleanArrayKt.getOrDefault

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

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

SparseBooleanArrayKt.getOrElse

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

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

SparseBooleanArrayKt.isEmpty

@NonNull
public static final boolean SparseBooleanArrayKt.isEmpty(@NonNull SparseBooleanArray receiver)

Return true when the collection contains no elements.

SparseBooleanArrayKt.isNotEmpty

@NonNull
public static final boolean SparseBooleanArrayKt.isNotEmpty(@NonNull SparseBooleanArray receiver)

Return true when the collection contains elements.

SparseBooleanArrayKt.keyIterator

@NonNull
public static final IntIterator SparseBooleanArrayKt.keyIterator(@NonNull SparseBooleanArray receiver)

Return an iterator over the collection's keys.

SparseBooleanArrayKt.plus

@NonNull
public static final SparseBooleanArray SparseBooleanArrayKt.plus(
    @NonNull SparseBooleanArray receiver,
    @NonNull SparseBooleanArray other
)

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

SparseBooleanArrayKt.putAll

@NonNull
public static final void SparseBooleanArrayKt.putAll(
    @NonNull SparseBooleanArray receiver,
    @NonNull SparseBooleanArray other
)

Update this collection by adding or replacing entries from other.

SparseBooleanArrayKt.remove

@NonNull
public static final boolean SparseBooleanArrayKt.remove(
    @NonNull SparseBooleanArray receiver,
    int key,
    boolean value
)

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

SparseBooleanArrayKt.set

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

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

SparseBooleanArrayKt.valueIterator

@NonNull
public static final BooleanIterator SparseBooleanArrayKt.valueIterator(
    @NonNull SparseBooleanArray receiver
)

Return an iterator over the collection's values.