Considering Java types (like Collection) as subtypes of Kotlin types (like MutableCollection)

Viewed 75

Kotlin somehow considers java.util.Collection as extending kotlin.collections.MutableCollection.

Is there any way for this same functionality to be used by code written outside the Kotlin standard libraries?

e.g., I want to create my own Kotlin NavigableMap & MutableNavigableMap interfaces (with the latter extending the former). I want java.util.NavigableMap considered as extending my MutableNavigableMap.

0 Answers
Related