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

Class ForbidSubStr

  • All Implemented Interfaces:
    CellProcessor, StringCellProcessor


    public class ForbidSubStr
    extends CellProcessorAdaptor
    implements StringCellProcessor
    Converts the input to a String and ensures that it doesn't contain any of the supplied substrings. For example, this constraint might be handy when reading/writing filenames and wanting to ensure no filename contains ":", "/", etc.
    Since:
    1.10
    • Constructor Summary

      Constructors 
      Constructor and Description
      ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings)
      Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings.
      ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings, CellProcessor next)
      Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings, then calls the next processor in the chain.
      ForbidSubStr(java.lang.String... forbiddenSubStrings)
      Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings.
      ForbidSubStr(java.lang.String[] forbiddenSubStrings, CellProcessor next)
      Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings, then calls the next processor in the chain.
      ForbidSubStr(java.lang.String forbiddenSubString, CellProcessor next)
      Constructs a new ForbidSubStr processor which ensures the input doesn't contain the supplied substring, 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

      • ForbidSubStr

        public ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings)
        Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings.
        Parameters:
        forbiddenSubStrings - the List of forbidden substrings
        Throws:
        java.lang.NullPointerException - if forbiddenSubStrings or one of its elements is null
        java.lang.IllegalArgumentException - if forbiddenSubStrings is empty
      • ForbidSubStr

        public ForbidSubStr(java.lang.String... forbiddenSubStrings)
        Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings.
        Parameters:
        forbiddenSubStrings - the forbidden substrings
        Throws:
        java.lang.NullPointerException - if forbiddenSubStrings or one of its elements is null
        java.lang.IllegalArgumentException - if forbiddenSubStrings is empty
      • ForbidSubStr

        public ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings,
                            CellProcessor next)
        Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings, then calls the next processor in the chain.
        Parameters:
        forbiddenSubStrings - the List of forbidden substrings
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if forbiddenSubStrings, one of its elements or next is null
        java.lang.IllegalArgumentException - if forbiddenSubStrings is empty
      • ForbidSubStr

        public ForbidSubStr(java.lang.String forbiddenSubString,
                            CellProcessor next)
        Constructs a new ForbidSubStr processor which ensures the input doesn't contain the supplied substring, then calls the next processor in the chain.
        Parameters:
        forbiddenSubString - the forbidden substring
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if forbiddenSubString or next is null
      • ForbidSubStr

        public ForbidSubStr(java.lang.String[] forbiddenSubStrings,
                            CellProcessor next)
        Constructs a new ForbidSubStr processor which ensures the input doesn't contain any of the supplied substrings, then calls the next processor in the chain.
        Parameters:
        forbiddenSubStrings - the forbidden substrings
        next - the next processor in the chain
        Throws:
        java.lang.NullPointerException - if forbiddenSubStrings, one of its elements or next is null
        java.lang.IllegalArgumentException - if forbiddenSubStrings is empty

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.