commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [collections] [contribution] CompositeSet and CompositeMap
Date Tue, 09 Dec 2003 03:38:55 GMT
Brian McCallister wrote:
> Hash: SHA1
> On Dec 7, 2003, at 7:08 PM, Stephen Colebourne wrote:
>> I think that they probably are useful additions, however the review and
>> commit may take some time :-)
> No worries =) I don't have an immediate or near future need for them to 
> be in commons-collections -- they can live happily on their own working 
> against the present release. I just thought that they would fit well so 
> wanted to contribute them.
> I'll try to keep an eye on this list for discussion in the future on 
> them when someone has a chance to review, but it is high enough volume 
> that things slip through sometimes.


I had a look.  I now see the changes necessary to the CompositeCollection 
class and my previous comments on the earlier submission still hold:


* Please try to follow the [collections] style for braces.


Why does CompositeSet extend CompositeCollection? The setup looks a bit 
strained to me (e.g. the type checking in the addComposited method).

Looking carefully at what addComposited does in CompositeSet, I am not 
sure that I understand what CompositeSet and CompositeMap are trying to 
do.  I understood CompositeCollection to be a convenient way to decorate a 
  collection of Collections to provide a unified view.  Once you try to 
control "collisions", as in the Set and Map impls, you seem to be headed 
for some kind of partition concept.  Is that what you had in mind?  Also, 
since add() and resolveCollisions() are separate methods in the mutator 
interface, one could presumably do inconsistent things -- i.e., allow 
"duplicates" to be added directly via add() but disallow them in 
addComposited() by having resolveCollisions prevent duplicates.

Can you explain a little more what the use cases for these things are?


> - -Brian
> Version: GnuPG v1.2.3 (Darwin)
> iD8DBQE/08H+aOuMdvjqKWcRAjQUAJ49yLhytK5FWZae1FzSEW+LtlkwvwCfR71C
> LJchgJsHh5ugSoK8V5mrbvY=
> =u7Ze
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message