scala.jdk.OptionConverters.RichOptional
Provides conversions from Java Optional to Scala Option and specialized Optional types.
Type parameters
- A
-
the type of the value contained in the Optional
Value parameters
- o
-
the Java Optional to convert
Attributes
- Source
-
OptionConverters.scala
- Graph
-
- Supertypes
-
Members list
Converts a generic Java Optional to a specialized variant.
Converts a generic Java Optional to a specialized variant.
Type parameters
- O
-
the target specialized Java Optional type, inferred from the available OptionShape instance (e.g., OptionalInt, OptionalDouble, OptionalLong)
Value parameters
- shape
-
implicit evidence that defines how to convert between Optional[A] and the specialized type O
Attributes
- Source
-
OptionConverters.scala
Converts a Java Optional to a Scala Option.
Converts a Java Optional to a Scala Option.
Converts a Java Optional to a Scala Option.
Attributes
- Deprecated
-
[Since version 2.13.0] Use `toScala` instead
- Source
-
OptionConverters.scala