commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [Collections] When to use a Predicate?
Date Mon, 19 Dec 2005 21:23:55 GMT
Bernard, Shawn wrote:
> Under what circumstanes would one use a Predicate to encase conditional logic?  I know
it's a rather broad question, but I was looking at them and they seem pretty powerful, but
I wouldn't want to use them incorrectly.

If you like the functor style of programming then go ahead and use it!

There is a potential downside in terms of extra classes and object 
instantiation, but on modern JVMs thats not really a big issue.

Stephen



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message