KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way in Scala to convert a List[Int] to java.util.List[java.lang.Integer] ? I'm interfacing with Java (Thrift). JavaConversions supports List --> java.util.List , and implicits exist between Int --> java.lang.Integer , but from what I can tell I would still need an extra pass to manually do the conversion: val y = List(1) val z: java.util.List[Integer] = asList(y) map { (x: Int) => x : java.lang.Integer }
Tags (comma-separated)
Save Edits
Cancel