Readium
Toggle table of contents
androidJvm
Target filter
androidJvm
Switch theme
Search in API
Skip to content
Readium
readium-shared
/
org.readium.r2.shared.util
/
Either
Either
sealed
class
Either
<
out
A
,
out
B
>
Generic wrapper to store two mutually exclusive types.
Inheritors
Left
Right
Members
Types
Companion
Link copied to clipboard
object
Companion
Left
Link copied to clipboard
data
class
Left
<
A
,
B
>
(
val
value
:
A
)
:
Either
<
A
,
B
>
Right
Link copied to clipboard
data
class
Right
<
A
,
B
>
(
val
value
:
B
)
:
Either
<
A
,
B
>
Properties
left
Link copied to clipboard
val
left
:
A
?
right
Link copied to clipboard
val
right
:
B
?
Functions
on
Left
Link copied to clipboard
inline
fun
onLeft
(
action
:
(
value
:
A
)
->
Unit
)
:
Either
<
A
,
B
>
on
Right
Link copied to clipboard
inline
fun
onRight
(
action
:
(
value
:
B
)
->
Unit
)
:
Either
<
A
,
B
>