← Docs
kotlin-stdlib / kotlin.jvm.optionals / java.util.Optional / Any

Any

JVM
JRE8
1.8
fun < T > Optional < out T > . Any ( )
(source)

Returns this Optional 's value if present , or otherwise defaultValue .

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .