How to create a scala.collection.immutable.Seq from a Java List in Java?

前端 未结 4 1506
我寻月下人不归
我寻月下人不归 2020-12-15 03:45

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

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 04:17

    You can use:

    scala.collection.JavaConverters.collectionAsScalaIterableConverter(workers).asScala().toSeq()

提交回复
热议问题