New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for improving MultiMap #2608
Comments
Imported From: https://issues.scala-lang.org/browse/SI-2608?orig=1 |
@adriaanm said: |
@adriaanm said: |
@kanielc said: |
Isn't it appropriate to close this issue? |
Consider allowing types more general than
Set
in aMultiMap
.The current definition is:
trait MultiMap[A, B] extends Map[A, Set[B]]
An example usage: if a
ListBuffer
could be used in place of aSet
, then theMultiMap
could be used to associate ordered, repeating values to the multimap key.This request was raised and discussed on the scala-user mailing list:
Subject:
MultiMap
with aList
instead of aSet
?http://old.nabble.com/MultiMap-with-a-List-instead-of-a-Set--to26199345.html
User suggestions include:
MultiMap
-like functionality withList
instead ofSet
; a generalization of it would be really useful"Seq[(A, Seq[B])]
, not only aMap
[...] it would be nice to use with aPriorityQueue
for timeline based data such as an animation or MIDI sequence etc. -- this way events that occur at the same time can be added individually but dequeued together."The text was updated successfully, but these errors were encountered: