Documentation of 'org.supercsv.cellprocessor.StrReplace' Java class
StrReplace
org.supercsv.cellprocessor

Class StrReplace

    • Constructor Summary

      Constructors 
      Constructor and Description
      StrReplace(java.lang.String regex, java.lang.String replacement)
      Constructs a new StrReplace processor, which replaces each substring of the input that matches the regex with the supplied replacement.
      StrReplace(java.lang.String regex, java.lang.String replacement, StringCellProcessor next)
      Constructs a new StrReplace processor, which replaces each substring of the input that matches the regex with the supplied replacement, then calls the next processor in the chain.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object execute(java.lang.Object value, CsvContext context)
      This method is invoked by the framework when the processor needs to process data or check constraints.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • StrReplace

        public StrReplace(java.lang.String regex,
                          java.lang.String replacement)
        Constructs a new StrReplace processor, which replaces each substring of the input that matches the regex with the supplied replacement.
        Parameters:
        regex - the regular expression to match
        replacement - the string to be substituted for each match
        Throws:
        java.lang.IllegalArgumentException - if regex is empty
        java.lang.NullPointerException - if regex or replacement is null
        java.util.regex.PatternSyntaxException - if regex is not a valid regular expression
      • StrReplace

        public StrReplace(java.lang.String regex,
                          java.lang.String replacement,
                          StringCellProcessor next)
        Constructs a new StrReplace processor, which replaces each substring of the input that matches the regex with the supplied replacement, then calls the next processor in the chain.
        Parameters:
        regex - the regular expression to match
        replacement - the string to be substituted for each match
        next - the next processor in the chain
        Throws:
        java.lang.IllegalArgumentException - if regex is empty
        java.lang.NullPointerException - if regex or replacement is null
        java.util.regex.PatternSyntaxException - if regex is not a valid regular expression
    • Method Detail

      • execute

        public java.lang.Object execute(java.lang.Object value,
                                        CsvContext context)
        This method is invoked by the framework when the processor needs to process data or check constraints.
        Specified by:
        execute in interface CellProcessor
        Throws:
        SuperCsvCellProcessorException - if value is null

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.