I\'m trying to get Akka going in my Java project, and I\'m hung up on a small issue with the Seq type(s) from Scala. I\'m able to convert my Java List of ActorRef into a sc
You can try this:
scala.collection.JavaConverters.asScalaIteratorConverter(list.iterator()).asScala().toSeq();
You can use:
scala.collection.JavaConverters.collectionAsScalaIterableConverter(workers).asScala().toSeq()
You can use scala.collection.JavaConversions.asScalaBuffer
to convert the Java List
to a Scala Buffer
, which has a toList
method, and a Scala List
is a collection.immutable.Seq
.
The akka Java documentation for routers as well as the ScalaDoc for CyclicIterator both suggest that the CyclicIterator constructor takes a List.