Wraps the given object in an Option, which resolves to None if the given object reference is null.
Wraps the given object in an Option, which resolves to None if the given object reference is null.
optionally, the wrapped object
If this Option is None, throw the given Throwable; else, return the value inside the Option
If this Option is None, throw the given Throwable; else, return the value inside the Option
the Throwable to potentially throw
the value inside the wrapped Option
if the Option is None
Wraps the given object in a Some.
Wraps the given object in a Some.
NOTE: calling .some
on a null value will throw an IllegalArgumentException. Therefore, only use .some
when
you absolutely know that the parameter is a constant and always will be.
Overall, prefer .opt
for null safety.
the wrapped object
Map the Option into Future success/fail states: if the Option is a Some, yield a Future with its value; if the Option is None, yield a Future with Throwable t as its failure state
Map the Option into Future success/fail states: if the Option is a Some, yield a Future with its value; if the Option is None, yield a Future with Throwable t as its failure state
the Throwable to potentially wrap as a failure
the Future-wrapped value of this Option, or a Future-wrapped failure Throwable
Extends an Option for side effects based on the optional value.
the type of the optional value