Kotlin introduced the new type: Result. I use it as a completion handler of several functions like this:
fun myFunction(completion: (Result<Boolean>) -> Unit)
Unfortunately I cannot use it in java. Java doesn't propose me getters like getOrNull or even isSuccess/isFailure.
How could I use it? Thanks