Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.jdk/scala.jdk.javaapi/OptionConverters

OptionConverters

scala.jdk.javaapi.OptionConverters

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.

Attributes

Source
OptionConverters.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Value members

Concrete methods

deftoJava[A](o:Option[A]):Optional[A]

Convert a ScalaOption to a JavaOptional

Convert a ScalaOption to a JavaOptional

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala
deftoScala[A](o:Optional[A]):Option[A]

Convert a JavaOptional to a ScalaOption

Convert a JavaOptional to a ScalaOption

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala

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.

Attributes

Source
OptionConverters.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp