Upgrade Regex with a tester() method?

Ben Evans benjamin.john.evans at gmail.com
Thu Jan 3 06:49:34 PST 2013


I've been thinking about places to include lambdas outside of the
collections libs.

I've had a look through the archives but can't find any obvious
discussion of this topic, so am posting here. If there are threads
I've missed - please point me at them.

What about upgrading java.util.regex.Pattern to include this method
(and / or similar):

public Predicate<String> tester(){
    return s -> this.matcher(s).find();

When writing articles and labs code which uses lambdas, I've found
myself writing helper classes to achieve a similar effect, and it
occurred to me that this could be a better way to solve the problem.



More information about the lambda-dev mailing list