org.hnau.base.extensions.Extensions.kt Maven / Gradle / Ivy
package org.hnau.base.extensions
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
/**
* Return [this]
*/
fun T.me() = this
/**
* Return [from]
*/
fun it(from: T) = from
/**
* Return [ReadOnlyProperty] with [this] as value
*/
val T.asDelegate: ReadOnlyProperty
get() = object : ReadOnlyProperty {
override fun getValue(thisRef: Any?, property: KProperty<*>) =
this@asDelegate
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy