public class Predicates extends Object
| Modifier | Constructor and Description |
|---|---|
private |
Predicates() |
| Modifier and Type | Method and Description |
|---|---|
static Predicate<String> |
excludes(String regexPatterns)
Generate a predicate function that for any supplied string returns
true if none of the regular
expressions in the supplied comma-separated list matches the predicate parameter. |
static <T> Predicate<T> |
excludes(String regexPatterns,
Function<T,String> conversion)
Generate a predicate function that for any supplied parameter returns
true if none of the regular
expressions in the supplied comma-separated list matches the predicate parameter. |
static Predicate<String> |
includes(String regexPatterns)
Generate a predicate function that for any supplied string returns
true if any of the regular expressions in
the supplied comma-separated list matches the predicate parameter. |
static <T> Predicate<T> |
includes(String regexPatterns,
Function<T,String> conversion)
Generate a predicate function that for any supplied parameter returns
true if any of the regular expressions
in the supplied comma-separated list matches the predicate parameter in a case-insensitive manner. |
static <R> Predicate<R> |
not(Predicate<R> predicate) |
static <T> Predicate<T> |
notNull() |
public static Predicate<String> includes(String regexPatterns)
true if any of the regular expressions in
the supplied comma-separated list matches the predicate parameter.regexPatterns - the comma-separated regular expression pattern (or literal) strings; may not be nullpublic static Predicate<String> excludes(String regexPatterns)
true if none of the regular
expressions in the supplied comma-separated list matches the predicate parameter.regexPatterns - the comma-separated regular expression pattern (or literal) strings; may not be nullpublic static <T> Predicate<T> includes(String regexPatterns, Function<T,String> conversion)
true if any of the regular expressions
in the supplied comma-separated list matches the predicate parameter in a case-insensitive manner.regexPatterns - the comma-separated regular expression pattern (or literal) strings; may not be nullconversion - the function that converts each predicate-supplied value to a string that can be matched against the
regular expressions; may not be nullpublic static <T> Predicate<T> excludes(String regexPatterns, Function<T,String> conversion)
true if none of the regular
expressions in the supplied comma-separated list matches the predicate parameter.regexPatterns - the comma-separated regular expression pattern (or literal) strings; may not be nullconversion - the function that converts each predicate-supplied value to a string that can be matched against the
regular expressions; may not be nullpublic static <T> Predicate<T> notNull()
Copyright © 2016 JBoss by Red Hat. All rights reserved.