Absent

Functions

Link copied to clipboard
fun <V> Optional<V>.getOrElse(fallback: V): V

Returns the value if this Optional is Present or fallback else.

Link copied to clipboard

Returns the value if this Optional is Present or null else.

Link copied to clipboard

Returns the value if this Optional is Present or throws MissingValueException else.

Link copied to clipboard
fun <V, R> Optional<V>.map(mapper: (V) -> R): Optional<R>