2.8 compatibility fix for graph generation

git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@999 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
dmharrah 2009-09-11 19:20:08 +00:00
parent b70521ac7a
commit 26103f19d4
1 changed files with 3 additions and 3 deletions

View File

@ -32,10 +32,10 @@ object DotGraph
def generateGraph[Key, Value](fileName: String, graphName: String, graph: Iterable[(Key, scala.collection.Set[Value])],
keyToString: Key => String, valueToString: Value => String) =
{
import scala.collection.mutable.{HashMap, MultiMap, Set}
val mappedGraph = new HashMap[String, Set[String]] with MultiMap[String, String]
import scala.collection.mutable.{HashMap, HashSet}
val mappedGraph = new HashMap[String, HashSet[String]]
for( (key, values) <- graph; keyString = keyToString(key); value <- values)
mappedGraph.add(keyString, valueToString(value))
mappedGraph.getOrElseUpdate(keyString, new HashSet[String]) += valueToString(value)
FileUtilities.write(new File(outputDir, fileName), log) { (writer: Writer) =>