OptionOps<A> extension
Additional combinators on Option.
- on
-
- Option<
A>
- Option<
Properties
- get → A
-
Available on Option<
Returns the value if this is a Some, or throws a StateError if this is a None.A> , provided by the OptionOps extensionno setter - getOrNull → A?
-
Available on Option<
Returns the value if this is a Some, orA> , provided by the OptionOps extensionnullif this is a None.no setter
Methods
-
contains(
A elem) → bool -
getOrElse(
Function0< A> ifEmpty) → A -
Available on Option<
Returns the value if this is a Some or the value returned from evaluatingA> , provided by the OptionOps extensionifEmpty. -
orElse(
Function0< Option< orElse) → Option<A> >A> -
Available on Option<
If this is a Some, this is returned, otherwise the result of evaluatingA> , provided by the OptionOps extensionorElseis returned.