Interface Substitution


  • public interface Substitution
    • Method Detail

      • handleMatch

        void handleMatch​(StringBuffer buffer,
                         MatchResult result)
        When substituting matches in a matcher, the handleMatch method of the supplied substitution is called with a MatchResult. This method then does something with the match and replaces the match with some output, like replace all 2*2 with (2*2 =) 4.
        Parameters:
        buffer - StringBuffer to append the output to
        result - MatchResult with the match