title: Kotlin result type in java
body: <p>Kotlin introduced the new type: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/" rel="noreferrer">Result</a>.
  I use it as a completion handler of several functions like this:</p>
  
  <pre><code>fun myFunction(completion: (Result&lt;Boolean&gt;) -&gt; Unit)
  </code></pre>
  
  <p>Unfortunately I cannot use it in java. Java doesn't propose me getters like getOrNull or even isSuccess/isFailure.</p>
  
  <p>How could I use it?
  Thanks</p>