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
SparseLongArrayKt.containsKey(
    @NonNull SparseLongArray receiver,
    int key
)

Returns true if the collection contains key.

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

Returns true if the collection contains value.

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

Performs the given action for each key/value entry.

static final @RequiresApi(value = "18") long
SparseLongArrayKt.getOrDefault(
    @NonNull 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(
    @NonNull SparseLongArray receiver,
    int key,
    @NonNull Function0<@NonNull 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

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

static final @RequiresApi(value = "18") void

Update this collection by adding or replacing entries from other.

static final @RequiresApi(value = "18") boolean
SparseLongArrayKt.remove(
    @NonNull 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(
    @NonNull 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

@NonNull
public final int size

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

Public methods

SparseLongArrayKt.contains

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

Returns true if the collection contains key.

SparseLongArrayKt.containsKey

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

Returns true if the collection contains key.

SparseLongArrayKt.containsValue

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

Returns true if the collection contains value.

SparseLongArrayKt.forEach

@RequiresApi(value = "18")
@NonNull
public static final @RequiresApi(value = "18") 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")
@NonNull
public static final @RequiresApi(value = "18") 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")
@NonNull
public static final @RequiresApi(value = "18") 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.isEmpty

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

Return true when the collection contains no elements.

SparseLongArrayKt.isNotEmpty

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

Return true when the collection contains elements.

SparseLongArrayKt.keyIterator

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

Return an iterator over the collection's keys.

SparseLongArrayKt.plus

@RequiresApi(value = "18")
@NonNull
public static final @RequiresApi(value = "18") 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")
@NonNull
public static final @RequiresApi(value = "18") void SparseLongArrayKt.putAll(
    @NonNull SparseLongArray receiver,
    @NonNull SparseLongArray other
)

Update this collection by adding or replacing entries from other.

SparseLongArrayKt.remove

@RequiresApi(value = "18")
@NonNull
public static final @RequiresApi(value = "18") 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")
@NonNull
public static final @RequiresApi(value = "18") 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")
@NonNull
public static final @RequiresApi(value = "18") LongIterator SparseLongArrayKt.valueIterator(@NonNull SparseLongArray receiver)

Return an iterator over the collection's values.