fun <K, V> LruCache<K, V>.getOrPut(key: K, defaultValue: () -> V): V
Gets value with specific key from the cache. If the value is not present, calls defaultValue to obtain a non-null value which is placed into the cache, then returned. |
|
fun <K, V> LruCache<K, V>.getOrPutNotNull(key: K, defaultValue: () -> V?): V?
Gets value with specific key from the cache. If the value is not present, calls defaultValue to obtain a value which is placed into the cache if not null, then returned. |
|
fun <V> LruCache<Int, V>.keys(): IntArray fun <V> LruCache<Long, V>.keys(): LongArray fun <K, V> LruCache<K, V>.keys(): Array<K>
Returns an array containing the keys in the cache. |