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): 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.