You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ju...@achatpro.com on 2002/10/09 14:43:27 UTC
[collection] MultiHashMap class improvements
Hi.
I use MultiHashMap class. I added a few improvements :
1) fix bug 9573 : http://issues.apache.org/bugzilla/show_bug.cgi?id=9573
MultiHashMap.values() is backed by map now .
(update method values() + add interns class Values & ValueIterator)
2) fix another bug : ArrayList can be put in MultiHashMap as value now
(update method put(Object,Object) and add method
readObject(ObjectInputStream))
3)update method clone() : each Collection container is cloned now.
4)add two useful methods in MultiMap & MultiHashMap class:
public boolean contains( Object key, Object item )
public void putAll( Object key, Collection collection )
5) add a method protected Collection getNewInstanceContainer( int size )
So it will be possible later to create a AbstractMultiMap?
JUnit tests are OK,
Any comments are welcome
JB
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [collection] MultiHashMap class improvements
Posted by Stephen Colebourne <sc...@btopenworld.com>.
I have taken a look at the patch. Unfortunately I can't use it at present
because it would involve changing the MultiMap interface. Once released, we
generally do not change interfaces.
Stephen
----- Original Message -----
From: <ju...@achatpro.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, October 09, 2002 1:43 PM
Subject: [collection] MultiHashMap class improvements
> Hi.
>
> I use MultiHashMap class. I added a few improvements :
>
> 1) fix bug 9573 : http://issues.apache.org/bugzilla/show_bug.cgi?id=9573
> MultiHashMap.values() is backed by map now .
> (update method values() + add interns class Values & ValueIterator)
>
> 2) fix another bug : ArrayList can be put in MultiHashMap as value now
> (update method put(Object,Object) and add method
> readObject(ObjectInputStream))
>
> 3)update method clone() : each Collection container is cloned now.
>
> 4)add two useful methods in MultiMap & MultiHashMap class:
>
> public boolean contains( Object key, Object item )
> public void putAll( Object key, Collection collection )
>
> 5) add a method protected Collection getNewInstanceContainer( int size )
> So it will be possible later to create a AbstractMultiMap?
>
> JUnit tests are OK,
>
> Any comments are welcome
>
> JB
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>