I have a ConcurrentHashMap object defined as below:
import scala.collection.JavaConversions._
val storage: ConcurrentMap[String,ConcurrentMap[Int,ConcurrentMap[String,Double]]] =
new ConcurrentHashMap[String,ConcurrentHashMap[Int,ConcurrentHashMap[String,Double]]]
And Scala (2.8.1) complains at compilation with the following error:
found : java.util.concurrent.ConcurrentHashMap[String,java.util.concurrent.ConcurrentHashMap[String,String]]
required: scala.collection.mutable.ConcurrentMap[String,scala.collection.mutable.ConcurrentMap[String,String]]
But when I try the following code, it works:
val storage: ConcurrentMap[String,Double] = new ConcurrentHashMap[String,Double]
I appreciate your comment how to fix this error.