Created
August 24, 2011 15:58
-
-
Save casualjim/1168386 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| object MultiMap { | |
| type Coll = MultiMap | |
| def apply(elems: (String, Seq[String])*): MultiMap = (newBuilder ++= elems).result | |
| def newBuilder: Builder[(String, Seq[String]), MultiMap] = new MapBuilder[String, Seq[String], MultiMap](empty) | |
| implicit def canBuildFrom: CanBuildFrom[Map[String, Seq[String]], (String, Seq[String]), MultiMap] = { | |
| new CanBuildFrom[Map[String, Seq[String]], (String, Seq[String]), MultiMap] { | |
| def apply(from: Map[String, Seq[String]]) = newBuilder | |
| def apply() = newBuilder | |
| } | |
| } | |
| def empty = new MultiMap() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment