commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael U. C. Afonso" <>
Subject Tranformer collection processor
Date Wed, 04 Aug 2004 02:09:30 GMT

Is there something in Collections that, given a collection 
and a Transformer, return a collection of transformed 
It would be like this:

class TransformeProcessorCollection {
    private Transformer transformer;
    public TransformeProcessorCollection(Transformer trans) {
        transformer = trans;
    public Collection process(Colletcion col) {
        Collection newCol = new ArrayList(col.size); // Or 
some other type of Collection
        Iterator it = new TransformIterator(col.iterator(), 
        while(it.hasNext()) {
        return newCol;


If it does not exist, I would like suggest it for Commons 
Collections. Something similar would be done with Closures 
and Predicates.


Rafael Ubiratam Clemente Afonso
Where is Debug?
Debug is on the Table!
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!

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

View raw message