Class RegexPredicate<T>

    • Constructor Detail

      • RegexPredicate

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

      • 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