On 03/28/2014 12:47 AM, Ted Dunning wrote: > Following Guava on this has something to be said for it. > > https://code.google.com/p/guava-libraries/wiki/NewCollectionTypesExplained > > Their decision is that Multimap#get returns a collection always. If there > are no values, then an empty collection is returned so that you can always > do > > m.get(key).size() > > or > > m.get(key).add(foo) > > The value returned is a magical view which only takes up space on demand so > there is little consing done. There is an asMap method for which get will > return null on missing keys.
the choice of guava is the most reasonable imho, thus I think we should implement a similar behavior. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org