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

ru.hnau.jutils.getter.mutable.MutableGetter.kt Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package ru.hnau.jutils.getter.mutable

import ru.hnau.jutils.TimeValue


open class MutableGetter(
        valueLifetime: TimeValue? = null,
        getter: () -> V
) : MutableParamGetter(
        valueLifetime,
        { getter.invoke() }
) {

    fun get() = get(Unit)

    fun invalidate() = synchronized(this) {
        clear()
        get()
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy