Example usage for java.util.regex Pattern asPredicate

List of usage examples for java.util.regex Pattern asPredicate

Introduction

In this page you can find the example usage for java.util.regex Pattern asPredicate.

Prototype

public Predicate<String> asPredicate() 

Source Link

Document

Creates a predicate that tests if this pattern is found in a given input string.

Usage

From source file:com.civprod.writerstoolbox.NaturalLanguage.util.TextAndTokenHandling.RegexTokenFilter.java

@Override
public boolean test(String t) {
    return filterPattern.parallelStream().anyMatch((Pattern curPattern) -> curPattern.asPredicate().test(t));
}