Represents a value that might or might not be.
The API is inspired from Option in scala. You operate on this type
like you would on an array, allowing you to chain possible mappings operations
that will happen if a value is defined (of type Some),
and will not happen if the value is undefined (of type None).
Maps the contained value with a function that returns Optional.
It functions like map, except it also flattens so that you don't
get a nested Optional<Optional>
Performs the operation on the given value, then return the option again.
This is unlike the Scala API, where Unit is returned. here it allows
for additional chaining of mappings etc.
Represents a value that might or might not be. The API is inspired from Option in scala. You operate on this type like you would on an array, allowing you to chain possible mappings operations that will happen if a value is defined (of type Some), and will not happen if the value is undefined (of type None).