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>
A Predicate that checks that a given input string matches a regular expression. If a given input is null this predicate returns false.
Since:
7.4.0
  • Field Details

    • pattern

      @Nonnull private Pattern pattern
      Regular expression.
  • Constructor Details

    • RegexPredicate

      public RegexPredicate​(@Nonnull Pattern p)
      Pattern constructor.
      Parameters:
      p - the pattern to match the input against
    • RegexPredicate

      public RegexPredicate​(@Nonnull @NotEmpty String s)
      String constructor.
      Parameters:
      s - the pattern to match the input against
  • Method Details