Documentation of 'org.supercsv.cellprocessor.constraint.StrRegEx' Java class
StrRegEx
org.supercsv.cellprocessor.constraint

Class StrRegEx

    • Constructor Summary

      Constructors 
      Constructor and Description
      StrRegEx(java.lang.String regex)
      Constructs a new StrRegEx processor, which ensures that the input data matches the given regular expression.
      StrRegEx(java.lang.String regex, StringCellProcessor next)
      Constructs a new StrRegEx processor, which ensures that the input data matches the given regular expression, then calls the next processor in the chain.
    • Method Summary

      All Methods Static 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.
      static void registerMessage(java.lang.String regex, java.lang.String message)
      Register a message detailing in plain language the constraint representing a regular expression.
      • Methods inherited from class java.lang.Object

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

      • StrRegEx

        public StrRegEx(java.lang.String regex)
        Constructs a new StrRegEx processor, which ensures that the input data matches the given regular expression.
        Parameters:
        regex - the regular expression to match
        Throws:
        java.lang.NullPointerException - if regex is null
        java.lang.IllegalArgumentException - if regex is empty
        java.util.regex.PatternSyntaxException - if regex is not a valid regular expression
      • StrRegEx

        public StrRegEx(java.lang.String regex,
                        StringCellProcessor next)
        Constructs a new StrRegEx processor, which ensures that the input data matches the given regular expression, then calls the next processor in the chain.
        Parameters:
        regex - the regular expression to match
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if regex is null
        java.lang.IllegalArgumentException - if regex is empty
        java.util.regex.PatternSyntaxException - if regex is not a valid regular expression
    • Method Detail

      • registerMessage

        public static void registerMessage(java.lang.String regex,
                                           java.lang.String message)
        Register a message detailing in plain language the constraint representing a regular expression. For example, the regular expression \d{0,6}(\.\d{0,3})? could be associated with the message "up to 6 digits whole digits, followed by up to 3 fractional digits".
        Parameters:
        regex - the regular expression
        message - the message to associate with the regex

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.