commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From __matthewHawthorne <ma...@phreaker.net>
Subject Re: [collections] [PATCH] CompositeCollection class for Commons-Collections
Date Tue, 04 Nov 2003 03:47:03 GMT
I took a quick glance, and I think it looks good.  I can't really 
imagine a use case for this class, but I'm sure somebody else can.




Stephen Colebourne wrote:
> I've updated the class in line with commons standards/documentation etc. It
> will probably end up in the decorators subpackage, as it decorates other
> collections.
> 
> I've also changed the way the Mutator works - see what you think, it seems
> cleaner/quicker I think.
> 
> The test case still needs looking at as it doesn't extend the collections
> testframework.
> 
> Any other [collections] committers care to comment on the
> idea/implementation????
> 
> Stephen
> 
> ----- Original Message -----
> From: "Brian McCallister" <mccallister@forthillcompany.com>
> 
>>On Sunday, November 2, 2003, at 07:27 PM, Stephen Colebourne wrote:
>>
>>>I haven't tested it, but I suspect the performance gain to be
>>>noticable, and
>>>[collections] has to choose the fastest implementation if it has a
>>>choice.
>>>Would you consider the alternative implementation I suggest?
>>>
>>>Stephen
>>
>>Performance optimized version attached. I think this actually reads
>>more clearly anyway. Must try to stop thinking in Ruby when writing
>>Java =) I also cleaned up the spec breaking toArray(Object[] array)
>>implementation.
>>
>>The highly unoptimized part is adding and removing composited
>>collections. I let ArrayList handle the array resizing for me.
>>
>>-Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message