Closures with CollectionUtils
Here's a pretty nifty trick for using closure's with Jakarta Commons CollectionUtils:
List list = new ArrayList();
|
I wonder if there's any performance hit from doing things this way vs. a good ol' Iterator? Hat tip to Anand Subramanian.
Posted by Anonymous Coward on April 13, 2005 at 03:26 PM MDT #
Posted by sam newman on April 13, 2005 at 03:37 PM MDT #
Posted by Nikolay Kolev on April 13, 2005 at 06:12 PM MDT #
Posted by Dmitri Maximovich on April 13, 2005 at 06:13 PM MDT #
Posted by Colin Sampaleanu on April 13, 2005 at 06:26 PM MDT #
Posted by Keith Donald on April 13, 2005 at 06:32 PM MDT #
Posted by Keith Donald on April 13, 2005 at 06:42 PM MDT #
One object per iteration is nothing performance wise. The coding overhead on the other hand:
vs.
What's the point of the closure?
Posted by Bob Lee on April 13, 2005 at 07:05 PM MDT #
<em>What's the point of the closure?</em>
But...but...it's a <strong>CLOSURE</strong>. That <em>has</em> to be better. :-)
Posted by Dennis Doubleday on April 13, 2005 at 08:06 PM MDT #
Posted by Keith Donald on April 13, 2005 at 08:29 PM MDT #
Posted by Alex Winston on April 13, 2005 at 08:34 PM MDT #
Posted by Bob Lee on April 13, 2005 at 10:39 PM MDT #
Posted by Eric Pramono on April 14, 2005 at 04:58 AM MDT #
Posted by rory on April 14, 2005 at 08:49 AM MDT #
Rory - I use a JSPWiki Plugin for Roller.
Posted by Matt Raible on April 14, 2005 at 02:24 PM MDT #
Posted by Keith Donald on April 14, 2005 at 06:41 PM MDT #
Posted by Eric Pramono on April 15, 2005 at 04:43 AM MDT #
Posted by eu on April 28, 2005 at 03:20 AM MDT #