KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm having compilation issues between Scala and Java. My Java code needs a java.util.Map<Double, java.lang.Iterable<Foo>> My scala code has a Map[Double, Vector[Foo]] I get the compilation error: error: type mismatch; found : scala.collection.immutable.Map[scala.Double,Vector[Foo] required: java.util.Map[java.lang.Double,java.lang.Iterable[Foo]] It seems the scala.collection.JavaConversions don't apply to nested collections, even though a Vector can be implictly converted to an Iterable. Short of iterating through the scala collection and doing the conversion by hand, is there something I can do to make the types work?
Tags (comma-separated)
Save Edits
Cancel