I have the following code:
private lazy val keys: List[String] = obj.getKeys().asScala.toList
obj.getKeys returns a java.uti
obj.getKeys
java.uti
As of scala 2.12.8 one could use
import scala.collection.JavaConverters._ asScalaIterator(java.util.Iterator variable).toSeq