[concurrency-interest] forkjoin.ParallelArray and friends

Gregg Wonderly gregg at cytetech.com
Tue Aug 28 10:10:34 EDT 2007

Doug Lea wrote:
> And one more:
> ParallelArray tries to be as agnostic as possible about whether
> Java will ever provide some form of syntactic closure support.
> Without closures, users will need to create lots of little
> classes and instances like the illustrated
>      static final class IsSenior implements Predicate<Student> {
>          public boolean evaluate(Student s) { return s.credits > 90; }
>      }
>      static final IsSenior isSenior = new IsSenior();

Using this pattern, it would be pretty easy to create a templating mechanism in 
Netbeans 6.0 which could find all existing Predicates in a class, show them to 
you, allow you to create new ones, and then insert a reference to one in your 
source code.

If no one else does this, I'm willing to do something to make this available 
late this year, as NB6.0 ends development.

Gregg Wonderly

More information about the Concurrency-interest mailing list