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

org.hnau.base.extensions.Extensions.kt Maven / Gradle / Ivy

There is a newer version: 2.1.9
Show newest version
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