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
Either the return value inside this option, or Nil
Either the return value inside this option, or Nil
the value inside this option, or Nil
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
Convenience methods for working with Option[List[A]]