Class RegexReplacementRule


  • public final class RegexReplacementRule
    extends Object
    Instances of this class shall represent a regular expression based replacement rule.
    • Constructor Detail

      • RegexReplacementRule

        public RegexReplacementRule()
    • Method Detail

      • setReplacement

        public void setReplacement​(String replacement)
        Sets the value to use for all regular expression matches.
        Parameters:
        replacement - if null no "replace all" logic is to be performed
      • setPattern

        public void setPattern​(String pattern)
        Sets the regular expression pattern used by this instance.
        Parameters:
        pattern - the regular expression which this instance will use
        Throws:
        NullPointerException - if the specified pattern parameter is null
        IllegalArgumentException - if the specified pattern parameter is invalid