commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <bri...@apache.org>
Subject Re: [collections] [PATCH] CompositeCollection class for Commons-Collections
Date Tue, 04 Nov 2003 14:05:17 GMT
On Monday, November 3, 2003, at 10:47 PM, __matthewHawthorne wrote:

> 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.

The exact one I created it for was where I have a class with a set of 
things, a parent with a set of things, its parent with a set of things 
etc. I needed to access them all as a single set from the lowest leaf 
as if all the things were in the set on that leaf -- and for 
performance reasons needed to support lazy loading of the collections 
(this is all being pulled from a database, using a materialization 
process that allows collection proxying until it is actually used then 
loading the contents), access/remove them via iteration, etc. Calling 
Foo.removeThing(thing) to modify a typical unmodifiable collection 
would require searching for said thing across all and sundry -- ick.

-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