Optional

data class Optional<T : Any>(value: T?)

Constructors

Link copied to clipboard
fun <T : Any> Optional(value: T?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun get(): T
Link copied to clipboard
fun getOrNull(): T?
Link copied to clipboard
fun hasValue(): Boolean
Link copied to clipboard
fun <U : Any> map(fn: (T) -> U?): Optional<U>
Link copied to clipboard
fun orElse(fn: () -> T): T
Link copied to clipboard
fun orNull(): T?