Convert from java.util.Vector to a scala Seq
JavaConverters
is a bit more idiomatic than JavaConversions
.
import collection.JavaConverters._
val v = new java.util.Vector[Int]
val s: Seq[Int] = v.asScala
Import JavaConversions
:
import collection.JavaConversions._
val v = new java.util.Vector[Int]()
val s = v.toSeq
// s is of type Seq[Int]