commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Hall <>
Subject [collections] Generic Collections MultiMap conversion
Date Wed, 15 Jun 2005 21:48:39 GMT
Hi everyone,

I just committed a fairly big change to MultiMap under our project at 
sourceforge ( ).  We decided in the end that 
to have a properly generic version of MultiMap meant that it couldn't be 
a Map anymore. The major difference now is that even though a MultiMap 
is defined as MultiMap<K,V> it's get method signature is Collection<V> 
get(K key). As a result  MultiMap<K,V> is now a stand alone interface 
and it's implementation MultiHashMap<K,V> no longer extends HashMap<K,V> 
but instead contains a HashMap<K,Collection<V>> and adapts many of the 
calls through to that contained HashMap.

I'll spare everyone the details, but this caused some problems on the 
test case side of things, I ended up replicating the AbstractTestMap 
into a new AbstractTestMultiMap which could probably use a little 
refactoring to remove some of the obvious duplication.

Aside from that there are some cosmetic issues which I'll address next, 
most importantly the javadocs for a number of methods need to be 
updated, but it is passing all test cases at the moment so should be ok 
for use.

I'm guessing we'll do another release soon, but for the moment if you're 
interested you can get the latest from cvs.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message