core-ktx / androidx.util

Package androidx.util

Extensions for External Classes

android.util.AtomicFile

android.util.LongSparseArray

android.util.Pair

android.util.Range

android.util.Size

android.util.SizeF

android.util.SparseArray

android.util.SparseBooleanArray

android.util.SparseIntArray

android.util.SparseLongArray

kotlin.Double

kotlin.Float

kotlin.Pair

kotlin.Short

kotlin.String

kotlin.ranges.ClosedRange

Functions

arrayMapOf

fun <K, V> arrayMapOf(): ArrayMap<K, V>

Returns an empty new ArrayMap.

fun <K, V> arrayMapOf(vararg pairs: Pair<K, V>): ArrayMap<K, V>

Returns a new ArrayMap with the specified contents, given as a list of pairs where the first component is the key and the second component is the value.

arraySetOf

fun <T> arraySetOf(): ArraySet<T>

Returns an empty new ArraySet.

fun <T> arraySetOf(vararg values: T): ArraySet<T>

Returns a new ArraySet with the specified contents.

rangeTo

infix fun <T : Comparable<T>> T.rangeTo(that: T): Range<T>

Creates a range from this Comparable value to that.