Class RegexPredicate<T>

java.lang.Object
org.antublue.test.engine.internal.predicate.RegexPredicate<T>
Type Parameters:
T - the return type
All Implemented Interfaces:
Predicate<T>
Direct Known Subclasses:
TestClassPredicate, TestClassTagPredicate, TestMethodPredicate, TestMethodTagPredicate

public abstract class RegexPredicate<T> extends Object implements Predicate<T>
Class to implement a regex Predicate
  • Field Details

    • regex

      protected String regex
    • pattern

      protected Pattern pattern
    • matcher

      protected Matcher matcher
  • Constructor Details

    • RegexPredicate

      protected RegexPredicate(String regex)
      Constructor
      Parameters:
      regex - the regular expression
  • Method Details

    • getRegex

      public String getRegex()
      Method to get the regex
      Returns:
      the regular expression
    • test

      public abstract boolean test(T value)
      Method to test the value using the regex
      Specified by:
      test in interface Predicate<T>
      Parameters:
      value - the input argument
      Returns:
      whether to accept the input argument