Apply side effect only if NOpt is empty.
Apply side effect only if NOpt is empty. It's a bit like foreach for NOpt.Empty
- code to be executed if nopt is empty
the same nopt
captionNOpt.forEmpty(logger.warn("caption is empty")).foreach(setCaption)
Converts this NOpt into Opt.
Converts this NOpt into Opt. Because Opt cannot hold null, NOpt(null) is translated to Opt.Empty.
Converts this NOpt into OptArg.
Converts this NOpt into OptArg. Because OptArg cannot hold null, NOpt(null) is translated to OptArg.Empty.
Converts this NOpt into OptRef, changing the element type into boxed representation if
necessary (e.g.
Converts this NOpt into OptRef, changing the element type into boxed representation if
necessary (e.g. Boolean into java.lang.Boolean). Because OptRef cannot hold null,
NOpt(null) is translated to OptRef.Empty.
Like Opt but does have a counterpart for
Some(null). In other words, NOpt is a "nullable Opt".