<p>I could write myself a helper class that does this when given a functor, but I was wondering if there's a better approach, or if there's something already in the standard library (seems like there should be).</p>

<p>Answers I've found on StackOverflow are all for C# which doesn't help me.</p>

<p>Thanks</p>

No - there isn't. Apache
```
commons-collections
```
has predicates for this sort of thing but the resultant code (using anonymous inner classes) is usually ugly and a pain to debug.
Just use a basic
for-loop
until they bring
closures
into the language