I want to create a Map which holds pairs (class -> seq of objects of class of key). Example below obviously fails but it should describe in details what I need. I will be glad for your help :)
object TestMain {
def main(args: Array[String]): Unit = {
val someMap: Map[Class[_], Seq[_]] = Map( //how to write this type correctly?
classOf[String] -> Seq("A", "B"),
classOf[Int] -> Seq(1, 2),
)
val typedValue: Seq[String] = someMap(classOf[String])//I want here type Seq[String] not Seq[_]
println(typedValue)
}
}