Created
November 19, 2010 05:18
-
-
Save debasishg/706149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import collection.mutable._ | |
scala> val m = new HashMap[Int, Set[String]] with MultiMap[Int, String] | |
m: scala.collection.mutable.HashMap[Int,scala.collection.mutable.Set[String]] with scala.collection.mutable.MultiMap[Int,String] = Map() | |
scala> m += ((1, Set("rc", "tb"))) | |
res10: m.type = Map((1,Set(tb, rc))) | |
scala> m += ((2, Set("tb"))) | |
res11: m.type = Map((2,Set(tb)), (1,Set(tb, rc))) | |
scala> m addBinding(1, "xy") | |
res12: m.type = Map((2,Set(tb)), (1,Set(tb, rc, xy))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment