All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.tz.co.asoft.InMemoryKeyValueStorage.kt Maven / Gradle / Ivy

The newest version!
package tz.co.asoft

class InMemoryKeyValueStorage(override val namespace: String = "") : KeyValueStorage {
    val data = mutableMapOf()
    override fun clear() = data.clear()
    override fun get(key: String): String? = data[key]
    override fun remove(key: String) {
        data.remove(key)
    }

    override fun set(key: String, value: String) {
        data[key] = value
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy