OneOf6

sealed interface OneOf6<out T1, out T2, out T3, out T4, out T5, out T6> : OneOf(source)

Six-way discriminated union.

Inheritors

Types

Link copied to clipboard
value class Option1<T>(val value: T) : OneOf6<T, Nothing, Nothing, Nothing, Nothing, Nothing>

Represents the first alternative of the union. @property value payload chosen for the first branch.

Link copied to clipboard
value class Option2<T>(val value: T) : OneOf6<Nothing, T, Nothing, Nothing, Nothing, Nothing>

Represents the second alternative of the union. @property value payload chosen for the second branch.

Link copied to clipboard
value class Option3<T>(val value: T) : OneOf6<Nothing, Nothing, T, Nothing, Nothing, Nothing>

Represents the third alternative of the union. @property value payload chosen for the third branch.

Link copied to clipboard
value class Option4<T>(val value: T) : OneOf6<Nothing, Nothing, Nothing, T, Nothing, Nothing>

Represents the fourth alternative of the union. @property value payload chosen for the fourth branch.

Link copied to clipboard
value class Option5<T>(val value: T) : OneOf6<Nothing, Nothing, Nothing, Nothing, T, Nothing>

Represents the fifth alternative of the union. @property value payload chosen for the fifth branch.

Link copied to clipboard
value class Option6<T>(val value: T) : OneOf6<Nothing, Nothing, Nothing, Nothing, Nothing, T>

Represents the sixth alternative of the union. @property value payload chosen for the sixth branch.

Functions

Link copied to clipboard
open fun <R> select(when1: (T1) -> R, when2: (T2) -> R, when3: (T3) -> R, when4: (T4) -> R, when5: (T5) -> R, when6: (T6) -> R): R

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