bitcoin-kmp
0.11.1
common
bitcoin-kmp
/
fr.acinq.bitcoin.utils
/
Either
Either
common
sealed
class
Either
<
out
L
,
out
R
>
Content copied to clipboard
Types
Functions
Properties
Extensions
Inheritors
Types
Left
Link copied to clipboard
common
data
class
Left
<
out
L
,
Nothing
>
(
val
value
:
L
)
:
Either
<
L
,
Nothing
>
Content copied to clipboard
Right
Link copied to clipboard
common
data
class
Right
<
Nothing
,
out
R
>
(
val
value
:
R
)
:
Either
<
Nothing
,
R
>
Content copied to clipboard
Functions
fold
Link copied to clipboard
common
inline
fun
<
X
>
fold
(
fl
:
(
L
)
->
X
,
fr
:
(
R
)
->
X
)
:
X
Content copied to clipboard
map
Link copied to clipboard
common
inline
fun
<
X
>
map
(
f
:
(
R
)
->
X
)
:
Either
<
L
,
X
>
Content copied to clipboard
transform
Link copied to clipboard
common
inline
fun
<
X
,
Y
>
transform
(
fl
:
(
L
)
->
X
,
fr
:
(
R
)
->
Y
)
:
Either
<
X
,
Y
>
Content copied to clipboard
Properties
isLeft
Link copied to clipboard
common
abstract
val
isLeft
:
Boolean
Content copied to clipboard
isRight
Link copied to clipboard
common
abstract
val
isRight
:
Boolean
Content copied to clipboard
left
Link copied to clipboard
common
abstract
val
left
:
L
?
Content copied to clipboard
right
Link copied to clipboard
common
abstract
val
right
:
R
?
Content copied to clipboard
Inheritors
Left
Link copied to clipboard
Right
Link copied to clipboard
Extensions
flat
Map
Link copied to clipboard
common
inline
fun
<
L
,
R
,
X
>
Either
<
L
,
R
>
.
flatMap
(
f
:
(
R
)
->
Either
<
L
,
X
>
)
:
Either
<
L
,
X
>
Content copied to clipboard
get
Or
Default
Link copied to clipboard
common
fun
<
L
,
R
>
Either
<
L
,
R
>
.
getOrDefault
(
defaultValue
:
R
)
:
R
Content copied to clipboard
get
Or
Else
Link copied to clipboard
common
inline
fun
<
L
,
R
>
Either
<
L
,
R
>
.
getOrElse
(
onLeft
:
(
L
)
->
R
)
:
R
Content copied to clipboard