Upgrade Regex with a tester() method?
Brian Goetz
brian.goetz at oracle.com
Fri Jan 4 07:07:17 PST 2013
Seems a nice "point lambdafication" suggestion. (The naming convention
we've been using as "asPredicate()".)
Regex is one of those areas where we wanted to do more with
lambdafication, but just didn't have the time to work through it. If
you want to suggest more...
On 1/3/2013 9:49 AM, Ben Evans wrote:
> Hi,
>
> 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.
>
> Thanks,
>
> Ben
>
More information about the lambda-dev
mailing list