Class RequireSubStr

java.lang.Object
org.supercsv.cellprocessor.CellProcessorAdaptor
org.supercsv.cellprocessor.constraint.RequireSubStr
All Implemented Interfaces:
CellProcessor, StringCellProcessor

public class RequireSubStr extends CellProcessorAdaptor implements StringCellProcessor
Converts the input to a String and ensures that the input contains at least one of the specified substrings.
Since:
1.10
Author:
Kasper B. Graversen, James Bassett
  • Constructor Details

    • RequireSubStr

      public RequireSubStr(String... requiredSubStrings)
      Converts the input to a String and ensures that the input contains at least one of the specified substrings.
      Parameters:
      requiredSubStrings - the required substrings
      Throws:
      NullPointerException - if requiredSubStrings or one of its elements is null
      IllegalArgumentException - if requiredSubStrings is empty
    • RequireSubStr

      public RequireSubStr(List<String> requiredSubStrings, CellProcessor next)
      Converts the input to a String, ensures that the input contains at least one of the specified substrings, then calls the next processor in the chain.
      Parameters:
      requiredSubStrings - the List of required substrings
      next - the next processor in the chain
      Throws:
      NullPointerException - if requiredSubStrings, one of its elements or next is null
      IllegalArgumentException - if requiredSubStrings is empty
    • RequireSubStr

      public RequireSubStr(String requiredSubString, CellProcessor next)
      Converts the input to a String, ensures that the input contains the specified substring, then calls the next processor in the chain.
      Parameters:
      requiredSubString - the required substring
      next - the next processor in the chain
      Throws:
      NullPointerException - if requiredSubString or next is null
    • RequireSubStr

      public RequireSubStr(String[] requiredSubStrings, CellProcessor next)
      Converts the input to a String, ensures that the input contains at least one of the specified substrings, then calls the next processor in the chain.
      Parameters:
      requiredSubStrings - the List of required substrings
      next - the next processor in the chain
      Throws:
      NullPointerException - if requiredSubStrings, one of its elements or next is null
      IllegalArgumentException - if requiredSubStrings is empty
  • Method Details