The problem is that you use incorrect syntax. This
for (allEntriesMap.entrySet[String, List[String]] allEntriesMapEntry : allEntriesMap.entrySet()) {
}
Should be written as:
for (entry: Map.Entry[String, List[String]] <- allEntriesMap.entrySet()) {
}
or simply
for (entry <- allEntriesMap.entrySet) {
}
Moreover, if you're using java collections type you have to import scala.collections.JavaConversions._
into scope (that will implicitly convert java collections into scala ones, so you may use all set of operations on them).