1.7 KiB
1.7 KiB
//app/com.fredhappyface.ewesticker/Cache
Cache
[androidJvm]
class Cache(size: Int)
Basically this behaved like an ordered set with some maximum capacity. When this capacity is exceeded an element is removed from the start
Constructors
Cache | [androidJvm] fun Cache(size: Int = 30) |
Functions
Name | Summary |
---|---|
add | [androidJvm] fun add(elem: String): String? Logic to add an element |
fromSharedPref | [androidJvm] fun fromSharedPref(raw: String) convert from a string (shared-pref) to this |
get | [androidJvm] fun get(idx: Int) Get an element |
toFiles | [androidJvm] fun toFiles(): Array<File> convert this to a array of files |
toSharedPref | [androidJvm] fun toSharedPref(): String convert this to a string to write to shared-pref |