commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [collections] - Few more collections for the masses... (impor tant for Struts view objects, maybe other projects)
Date Fri, 17 May 2002 17:54:38 GMT

> > public interface Factory {
> >     Object createObject();
> > }
> Christopher Marshal's proposed patch to SoftRefHashMap also uses more or
> less the exact same interface; seems a useful addition, though agonizingly
> vague.

I like the vagueness of it. Sometimes vague, loose interfaces can be a good
thing. Afterall Iterator, Predicate, Transformer are all nice and vague;
easy to plug stuff in, low assumptions/requirements on implementators,
loosely coupled etc.

I'm sure the collections library will find other uses for a factory of
objects (though I wonder how context might be dependent, such as the current
index/key of the collection on which to create a new element).

> We'd probably want a reflection-based default implementation somewhere.



Do You Yahoo!?
Get your free address at

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

View raw message