Atrium
1.0.0
common
atrium-core
/
ch.tutteli.atrium.core
/
Option
Option
sealed
class
Option
<
out
T
>
(
source
)
Represents an optional value with
map
,
flatMap
,
fold
and
getOrElse
to transform it.
Inheritors
Some
None
Members
Members & Extensions
Types
Companion
Link copied to clipboard
object
Companion
Functions
filter
Link copied to clipboard
inline
fun
filter
(
predicate
:
(
T
)
->
Boolean
)
:
Option
<
T
>
flat
Map
Link copied to clipboard
inline
fun
<
R
>
flatMap
(
f
:
(
T
)
->
Option
<
R
>
)
:
Option
<
R
>
fold
Link copied to clipboard
inline
fun
<
R
>
fold
(
default
:
(
)
->
R
,
f
:
(
T
)
->
R
)
:
R
get
Or
Else
Link copied to clipboard
inline
fun
<
T
>
Option
<
T
>
.
getOrElse
(
default
:
(
)
->
T
)
:
T
is
Defined
Link copied to clipboard
fun
isDefined
(
)
:
Boolean
map
Link copied to clipboard
inline
fun
<
R
>
map
(
f
:
(
T
)
->
R
)
:
Option
<
R
>