Package dev.petuska.gradle.kotlin.delegates.dsl

Functions

Link copied to clipboard
fun <T : Any, O : Any> GLazy<T>.convert(converter: (T) -> O?): GLazy<O>

Converts a given GLazy to GLazy by applying converter on each value request.

Link copied to clipboard
fun <T : Any> GLazy<T>.filter(filter: (T) -> Boolean): GLazy<T>

Filters GLazy values on each request and defaults to null if the current value does not match the filter

Link copied to clipboard
infix fun <T : Any> GLazy<T>.or(default: T): GLazy<T>

Registers default value as a fallback to use if thisGLazy has no value on request.

infix fun <T : Any> GLazy<T>.or(other: GLazy<T>): GLazy<T>
fun <T : Any, O : Any> GLazy<T>.or(other: GLazy<O>, converter: (O) -> T?): GLazy<T>

Registers other as a fallback to use if thisGLazy has no value on request.