Class RegexPredicate
- java.lang.Object
-
- net.shibboleth.utilities.java.support.logic.RegexPredicate
-
- All Implemented Interfaces:
Predicate<CharSequence>,Predicate<CharSequence>
public class RegexPredicate extends Object implements Predicate<CharSequence>
APredicatethat checks that a given input string matches a regular expression. If a given input isnullthis predicate returnsfalse.- Since:
- 7.4.0
-
-
Constructor Summary
Constructors Constructor Description RegexPredicate(String s)String constructor.RegexPredicate(Pattern p)Pattern constructor.
-
-
-
Field Detail
-
pattern
@Nonnull private Pattern pattern
Regular expression.
-
-
Method Detail
-
test
public boolean test(CharSequence input)
- Specified by:
testin interfacePredicate<CharSequence>
-
-