commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Oxspring <roxspr...@imapmail.org>
Subject [collections] TransformedCollection
Date Sat, 07 May 2005 15:42:09 GMT
Hi,

I've just been burnt (and not for the first time) by the fact that the 
TransformedCollection doesn't transform the objects that are already in 
the wrapped collection.  For example:

Collection dates = ... // a collection with Date objects in it
Transformer toString = ... // a transformer that calls toString
Collection strings =
     CollectionUtils.transformedCollection(dates,toString);

My intuition tells me that strings should be full of String objects and 
have no Date objects in it but the opposite is true.  Is this the 
intended behaviour or is this a bug?  I'm happy to patch the 
TransformedCollection class but wanted to run it passed people first...

Thanks,

Rob

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