doc / ch.tutteli.atrium.core / Some

Some

data class Some<T> : Option<T> (source)

Represents a present value in terms of Option.

Constructors

<init>

Some(value: T)

Represents a present value in terms of Option.

Properties

value

val value: T

Inherited Functions

filter

fun filter(predicate: (T) -> Boolean): Option<T>

flatMap

fun <R> flatMap(f: (T) -> Option<R>): Option<R>

fold

fun <R> fold(default: () -> R, f: (T) -> R): R

isDefined

fun isDefined(): Boolean

map

fun <R> map(f: (T) -> R): Option<R>

Extension Functions

getOrElse

fun <T> Option<T>.getOrElse(default: () -> T): T