This object contains methods that convert between ScalaOption and JavaOptional types.
The explicit conversion methods defined here are intended to be used in Java code. For Scala code, it is recommended to use the extension methods defined inscala.jdk.OptionConverters.
Convert a ScalaOption to a JavaOptional
Convert a ScalaOption[java.lang.Double] to a JavaOptionalDouble
Convert a ScalaOption[java.lang.Double] to a JavaOptionalDouble
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.
Convert a ScalaOption[java.lang.Integer] to a JavaOptionalInt
Convert a ScalaOption[java.lang.Integer] to a JavaOptionalInt
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.
Convert a ScalaOption[java.lang.Long] to a JavaOptionalLong
Convert a ScalaOption[java.lang.Long] to a JavaOptionalLong
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.
Convert a JavaOptional to a ScalaOption
Convert a JavaOptionalDouble to a ScalaOption[java.lang.Double]
Convert a JavaOptionalDouble to a ScalaOption[java.lang.Double]
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.
Convert a JavaOptionalInt to a ScalaOption[java.lang.Integer]
Convert a JavaOptionalInt to a ScalaOption[java.lang.Integer]
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.
Convert a JavaOptionalLong to a ScalaOption[java.lang.Long]
Convert a JavaOptionalLong to a ScalaOption[java.lang.Long]
Note: this method uses the boxed typejava.lang.X instead of the primitive typescala.X to improve compatibility when using it in Java code (the Scala compiler emitsC[Int] asC[Object] in bytecode due toscala/bug#4214). In Scala code, addimport scala.jdk.OptionConverters._ and use the extension methods instead.