or

infix fun <T : Any> GLazy<T>.or(other: GLazy<T>): GLazy<T>

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

Receiver

GLazy providing base value

Return

chained GLazy that falls back to other on missing base values

Parameters

other

GLazy to use when there is no base value


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.

Receiver

GLazy providing base value

Return

chained GLazy that falls back to other on missing base values

Parameters

other

GLazy to use when there is no base value

converter

to apply on other values when converting them to base type


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.

Receiver

GLazy providing base value

Return

chained GLazy that falls back to default value on missing base values

Parameters

default

value to use when there is no base value