Related to Stack Overflow question Scala equivalent of new HashSet(Collection) , how do I convert a Java collection (java.util.List say) into a Scala c
java.util.List
If you want to be more explicit than the JavaConversions demonstrated in robinst's answer, you can use JavaConverters:
import scala.collection.JavaConverters._ val l = new java.util.ArrayList[java.lang.String] val s = l.asScala.toSet