Export to GitHub

google-collections - issue #310

Allow asMap() to return a Map which has defined value Collections


Posted on Dec 18, 2009 by Grumpy Rabbit

The asMap() method currently always returns <K, Collection<V>> whether the implementation is an ArrayListMultimap or a HashSetMultimap. It seems like the Multimap interface could have another generic to tell what its return type is and be defined as <? extends Collection>.

Although it seems like a List and Set are truly returned, it's would be nicer to know from the returned Map, if it allows or has duplicates in the Collection or not and if it's indexable.

Comment #1

Posted on Dec 19, 2009 by Happy Wombat

dup of 118 (which was itself a repeat of 10)

Status: Duplicate