Class ExactOrRegexpPatternMatcher

  • All Implemented Interfaces:
    PatternMatcher

    public final class ExactOrRegexpPatternMatcher
    extends AbstractPatternMatcher
    A pattern matcher that tries to match exactly the input with the expression, or match it as a pattern.

    The evaluation for matching is perform first by checking if expression and input are equals (via equals method) else it attempts to do it by trying to match the input using the expression as a regexp.

    See Also:
    ExactPatternMatcher, RegexpPatternMatcher
    • Constructor Detail

      • ExactOrRegexpPatternMatcher

        public ExactOrRegexpPatternMatcher()
    • Method Detail

      • newMatcher

        protected Matcher newMatcher​(java.lang.String expression)
        Description copied from class: AbstractPatternMatcher
        Returns an instance of the implementation specific matcher.
        Specified by:
        newMatcher in class AbstractPatternMatcher
        Parameters:
        expression - the string to be matched.
        Returns:
        the instance of the related matcher. Never null.