Closed GoogleCodeExporter closed 9 years ago
If this is added I think an extra wildcard on the parameter should be
considered:
<K,V> ImmutableMultimap<K,V> ImmutableMultimap.copyOf(Map<? extends K, ?
extends Collection<V>>)
This was discussed in this thread, too:
http://groups.google.com/group/guava-discuss/browse_thread/thread/f1b947827bf5b6
d
Original comment by joe.j.kearney
on 3 Nov 2010 at 5:57
Original comment by kevinb@google.com
on 27 Jan 2011 at 6:01
Is this somewhat related to issue #320? Would
`ImmutableMultimap.copyOf(Iterable<Map.Entry<K, V>>)`, called with
`someMultimap.entries()`, be a possible compromise?
What are those "JDK like implementation[s] of multimap" exactly? Wouldn't they
support the interface I suggested above?
Original comment by j...@nwsnet.de
on 31 Mar 2011 at 12:26
Original comment by kevinb@google.com
on 13 Jul 2011 at 6:18
By "JDK like implementations of multimap" I mean:
java.util.Map<K, ? extends Collection<V>>
In other words, a regular Map where each key is mapped to a collection.
For such a Map, there's no easy way to get an Iterable<Map.Entry<K, V>>...
Calling entrySet() on such a Map will return Iterable<Map.Entry<K,
Collection<V>>>.
The idea is to give an easy way to "translate" existing legacy code (that uses
JDK) to Guavable code that uses Multimaps.
Original comment by idanavi...@yahoo.com
on 20 Nov 2011 at 3:32
Original comment by fry@google.com
on 10 Dec 2011 at 3:51
Original comment by fry@google.com
on 16 Feb 2012 at 7:17
Original comment by kevinb@google.com
on 30 May 2012 at 7:43
Original comment by kevinb@google.com
on 22 Jun 2012 at 6:16
Issue 1341 has been merged into this issue.
Original comment by wasserman.louis
on 16 Mar 2013 at 3:52
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:15
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:18
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:09
Original issue reported on code.google.com by
idanavi...@yahoo.com
on 3 Nov 2010 at 1:14