OptionOps
final
class AnyVal
trait Matchable
class Any
Value members
Concrete methods
final
Returns the item contained in the Option if it is defined, otherwise, raises an error with the provided message.
Returns the item contained in the Option if it is defined, otherwise, raises an error with the provided message.
Returns the item contained in the Option if it is defined, otherwise, the zero element for the type A
Returns the item contained in the Option if it is defined, otherwise, the zero element for the type A
For example:
val o: Option[List[String]] = None
val a: List[String] = ~o // List()