RichOptional

final implicit class RichOptional[A](o: Optional[A]) extends AnyVal

Provides conversions from Java Optional to Scala Option and specialized Optional types

Source:
OptionConverters.scala
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def toJavaPrimitive[O](implicit shape: OptionShape[A, O]): O

Convert a generic Java Optional to a specialized variant

Convert a generic Java Optional to a specialized variant

Source:
OptionConverters.scala
def toScala: Option[A]

Convert a Java Optional to a Scala Option

Convert a Java Optional to a Scala Option

Source:
OptionConverters.scala

Deprecated methods

@deprecated("Use `toScala` instead", "2.13.0")
def asScala: Option[A]

Convert a Java Optional to a Scala Option

Convert a Java Optional to a Scala Option

Deprecated
Source:
OptionConverters.scala