Class StringMatcher

    • Field Detail

      • value

        private final java.lang.String value
        The text value to match against.
      • mode

        private final StringMatcher.Mode mode
        The mode to apply for matching the given value against the matcher's input.
    • Constructor Detail

      • StringMatcher

        public StringMatcher​(java.lang.String value,
                             StringMatcher.Mode mode)
        Creates a new string matcher.
        Parameters:
        value - The value that is the base of the matching.
        mode - The mode to apply for matching the given value against the matcher's input
    • Method Detail

      • doMatch

        protected boolean doMatch​(java.lang.String target)
        Matches the supplied value if it was found not to be null.
        Specified by:
        doMatch in class ElementMatcher.Junction.ForNonNullValues<java.lang.String>
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object