I working on a Scala program that calls a function from a Java library, processes the results, and spits out a CSV.
The Java function in question looks like this:
Map<String, Map<String, AtomicLong>> getData();
The Scala:
import scala.collection.JavaConversions._
def analysisAndCsvStuff(data: Map[String, Map[String, AtomicLong]]): Unit { ... }
The error:
type mismatch;
found:java.util.Map[java...String,java...Map[java...String,java...AtomicLong]]
required: scala...Map[String,scala...Map[String,java...AtomicLong]]
(The path names were ruining the formatting.)
I'm guessing that the JavaConversions can successfully convert the outer java...Map but not the inner java...Map. I saw this question but I am unsure of how to go about writing an "explicit implicit conversion".