title: How to convert Scala's List[Double] to java.util.List[java.lang.Double]?
body: <p>I have only seen examples where the result is a Java list of Scala doubles. I got as far as</p>
  
  <pre><code>def getDistance(): java.util.List[java.lang.Double] = {
    val javadistance = distance.toList.asJava
    javadistance
  }
  </code></pre>
  
  <p>but this is still a Java list containing Scala doubles (<code>distance</code> is a member of the same class as <code>getDistance</code>).</p>