On this page
Object scala.Option
object Option
| Supertypes | |
|---|---|
| Self type |
Inherited types
Source
type MirroredElemLabels <: Tuple
The names of the product elements
| Inherited from | Mirror |
|---|
Source
type MirroredLabel <: String
The name of the type
| Inherited from | Mirror |
|---|
Concrete methods
Source
An Option factory which creates Some(x) if the argument is not null, and None if it is null.
| Value parameters |
|
|---|---|
| Returns | Some(value) if value != null, None if value == null |
Source
An Option factory which returns None in a manner consistent with the collections hierarchy.
Source@inline
Unless a given condition is true, this will evaluate the a argument and return Some(a). Otherwise, a is not evaluated and None is returned.
Source
When a given condition is true, evaluates the a argument and returns Some(a). When the condition is false, a is not evaluated and None is returned.
Implicits
Source
An implicit conversion that converts an option to an iterable value
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.1.1/scala/Option$.html