select

open fun <R> select(when1: (T1) -> R, when2: (T2) -> R, when3: (T3) -> R, when4: (T4) -> R, when5: (T5) -> R, when6: (T6) -> R, when7: (T7) -> R, when8: (T8) -> R, when9: (T9) -> R): R(source)

Exhaustively handles the stored value by delegating to the matching lambda.

Return

the result of the handler that matches the concrete option.

Parameters

when1

handler invoked when the receiver is an Option1.

when2

handler invoked when the receiver is an Option2.

when3

handler invoked when the receiver is an Option3.

when4

handler invoked when the receiver is an Option4.

when5

handler invoked when the receiver is an Option5.

when6

handler invoked when the receiver is an Option6.

when7

handler invoked when the receiver is an Option7.

when8

handler invoked when the receiver is an Option8.

when9

handler invoked when the receiver is an Option9.

See also