commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
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.

Agreed.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


Mime
View raw message