org.jetbrains.kotlinx.jupyter.util.UpdatableProvider.kt Maven / Gradle / Ivy
The newest version!
package org.jetbrains.kotlinx.jupyter.util
interface Provider {
fun provide(): T?
}
interface UpdatableProvider : Provider {
fun update(value: T)
}
open class UpdatableProviderImpl : UpdatableProvider {
private var value: T? = null
override fun provide(): T? {
return value
}
override fun update(value: T) {
this.value = value
}
}