IStorage

interface IStorage

Defines a way of synchronously set and get persistent small values

Inheritors

Functions

Link copied to clipboard
operator fun IStorage.contains(key: String): Boolean
Link copied to clipboard
operator fun IStorage.get(key: String): String
Link copied to clipboard
abstract fun getOrNull(key: String): String?
Link copied to clipboard
fun <T> IStorage.item(key: String, serialize: (T) -> String, deserialize: (String?) -> T): StorageKey<T>
Link copied to clipboard
fun IStorage.itemBool(key: String, default: Boolean = false): StorageKey<Boolean>
Link copied to clipboard
fun IStorage.itemDouble(key: String, default: Double = 0.0): StorageKey<Double>
Link copied to clipboard
fun IStorage.itemInt(key: String, default: Int = 0): StorageKey<Int>
Link copied to clipboard
fun IStorage.itemString(key: String, default: String = ""): StorageKey<String>
Link copied to clipboard
abstract fun remove(key: String)
Link copied to clipboard
abstract fun removeAll()
Link copied to clipboard
abstract operator fun set(key: String, value: String)