Provides conversions from Scala Option
to Java Optional
types
Provides conversions from Java Optional
to Scala Option
and specialized Optional
types
Provides conversions from OptionalDouble
to Scala Option
and the generic Optional
Provides conversions from OptionalInt
to Scala Option
and the generic Optional
Provides conversions from OptionalLong
to Scala Option
and the generic Optional
This object provides extension methods that convert between Scala
Option
and JavaOptional
types.Scala
Option
is extended with atoJava
method that creates a correspondingOptional
, and atoJavaPrimitive
method that creates a specialized variant (e.g.,OptionalInt
) if applicable.Java
Optional
is extended with atoScala
method and atoJavaPrimitive
method.Finally, specialized
Optional
types are extended withtoScala
andtoJavaGeneric
methods.Example usage: