public class ForbidSubStr extends CellProcessorAdaptor implements StringCellProcessor
next
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.
|
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.
|
toString, validateInputNotNull
public ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings)
forbiddenSubStrings
- the List of forbidden substringsjava.lang.NullPointerException
- if forbiddenSubStrings or one of its elements is nulljava.lang.IllegalArgumentException
- if forbiddenSubStrings is emptypublic ForbidSubStr(java.lang.String... forbiddenSubStrings)
forbiddenSubStrings
- the forbidden substringsjava.lang.NullPointerException
- if forbiddenSubStrings or one of its elements is nulljava.lang.IllegalArgumentException
- if forbiddenSubStrings is emptypublic ForbidSubStr(java.util.List<java.lang.String> forbiddenSubStrings, CellProcessor next)
forbiddenSubStrings
- the List of forbidden substringsnext
- the next processor in the chainjava.lang.NullPointerException
- if forbiddenSubStrings, one of its elements or next is nulljava.lang.IllegalArgumentException
- if forbiddenSubStrings is emptypublic ForbidSubStr(java.lang.String forbiddenSubString, CellProcessor next)
forbiddenSubString
- the forbidden substringnext
- the next processor in the chainjava.lang.NullPointerException
- if forbiddenSubString or next is nullpublic ForbidSubStr(java.lang.String[] forbiddenSubStrings, CellProcessor next)
forbiddenSubStrings
- the forbidden substringsnext
- the next processor in the chainjava.lang.NullPointerException
- if forbiddenSubStrings, one of its elements or next is nulljava.lang.IllegalArgumentException
- if forbiddenSubStrings is emptypublic java.lang.Object execute(java.lang.Object value, CsvContext context)
execute
in interface CellProcessor
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is nullSuperCsvConstraintViolationException
- if value is in the forbidden listCopyright © 2007-2014 Super CSV. All Rights Reserved.