public class Strlen extends CellProcessorAdaptor implements StringCellProcessor
> 0 or an exception is thrown. Lookup time is O(1).next| Constructor and Description |
|---|
Strlen(int... requiredLengths)
Constructs a new Strlen processor, which ensures that the input String has a length equal to any of the
supplied lengths.
|
Strlen(int[] requiredLengths,
CellProcessor next)
Constructs a new Strlen processor, which ensures that the input String has a length equal to any of the
supplied lengths, then calls the next processor in the chain.
|
Strlen(int requiredLength,
CellProcessor next)
Constructs a new Strlen processor, which ensures that the input String has a length equal to the
supplied length, 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, validateInputNotNullpublic Strlen(int... requiredLengths)
requiredLengths - one or more required lengthsjava.lang.NullPointerException - if requiredLengths is nulljava.lang.IllegalArgumentException - if requiredLengths is empty or contains a negative lengthpublic Strlen(int requiredLength,
CellProcessor next)
requiredLength - the required lengthnext - the next processor in the chainjava.lang.NullPointerException - if next is nulljava.lang.IllegalArgumentException - if requiredLength is negativepublic Strlen(int[] requiredLengths,
CellProcessor next)
requiredLengths - one or more required lengthsnext - the next processor in the chainjava.lang.NullPointerException - if requiredLengths or next is nulljava.lang.IllegalArgumentException - if requiredLengths is empty or contains a negative lengthpublic java.lang.Object execute(java.lang.Object value,
CsvContext context)
execute in interface CellProcessorvalue - the value to be processedcontext - the CSV contextSuperCsvCellProcessorException - if value is nullSuperCsvConstraintViolationException - if the length of value isn't one of the required lengthsCopyright © 2007-2014 Super CSV. All Rights Reserved.