Convert Scala Option to Java Optional
<p>I need to convert Scala Option to Java Optional. I managed to wrote this: </p>

<pre><code>public &lt;T&gt; Optional&lt;T&gt; convertOption2Optional(Option&lt;T&gt; option) {
    return option.isDefined() ? Optional.of(option.get()) : Optional.empty();
}
</code></pre>

<p>But I don't like it.</p>

<p>Is there a simple way to do it, or a built-in scala converter?
I'm looking for something like: </p>

<pre><code>Options.asJava(option);
</code></pre>