public class RequireSubStr extends CellProcessorAdaptor implements StringCellProcessor
next
Constructor and Description |
---|
RequireSubStr(java.util.List<java.lang.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.
|
RequireSubStr(java.lang.String... requiredSubStrings)
Converts the input to a String and ensures that the input contains at least one of the specified substrings.
|
RequireSubStr(java.lang.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.
|
RequireSubStr(java.lang.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.
|
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 RequireSubStr(java.lang.String... requiredSubStrings)
requiredSubStrings
- the required substringsjava.lang.NullPointerException
- if requiredSubStrings or one of its elements is nulljava.lang.IllegalArgumentException
- if requiredSubStrings is emptypublic RequireSubStr(java.util.List<java.lang.String> requiredSubStrings, CellProcessor next)
requiredSubStrings
- the List of required substringsnext
- the next processor in the chainjava.lang.NullPointerException
- if requiredSubStrings, one of its elements or next is nulljava.lang.IllegalArgumentException
- if requiredSubStrings is emptypublic RequireSubStr(java.lang.String requiredSubString, CellProcessor next)
requiredSubString
- the required substringnext
- the next processor in the chainjava.lang.NullPointerException
- if requiredSubString or next is nullpublic RequireSubStr(java.lang.String[] requiredSubStrings, CellProcessor next)
requiredSubStrings
- the List of required substringsnext
- the next processor in the chainjava.lang.NullPointerException
- if requiredSubStrings, one of its elements or next is nulljava.lang.IllegalArgumentException
- if requiredSubStrings 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 doesn't contain any of the required substringsCopyright © 2007-2014 Super CSV. All Rights Reserved.