Extensions for java.util.Optional
Any
Returns this Optional 's value if present , or otherwise defaultValue .
fun
<
T
>
Optional
<
out
T
>
.
Any
(
)
toCollection
Appends this Optional 's value to the given destination collection if present .
fun
<
T
:
Any
,
C
:
MutableCollection
<
in
T
>
>
Optional
<
T
>
.
toCollection
(
destination
:
C
)
:
C