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. |
|
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. |
|
fun <K : Any, V : Any> lruCache(maxSize: Int, sizeOf: (key: K, value: V) -> Int = { _, _ -> 1 }, create: (key: K) -> V? = { null as V? }, onEntryRemoved: (evicted: Boolean, key: K, oldValue: V, newValue: V?) -> Unit = { _, _, _, _ -> }): LruCache<K, V>
Creates an LruCache with the given parameters. |
|
infix fun <T : Comparable<T>> T.rangeTo(that: T): Range<T>
Creates a range from this Comparable value to that. |