public class StrMinMax extends CellProcessorAdaptor implements StringCellProcessor
toString()
method.next
Constructor and Description |
---|
StrMinMax(long min,
long max)
Constructs a new StrMinMax processor, which ensures that the input data has a string length between the
supplied min and max values (both inclusive).
|
StrMinMax(long min,
long max,
CellProcessor next)
Constructs a new StrMinMax processor, which ensures that the input data has a string length between the
supplied min and max values (both inclusive), then calls the next processor in the chain.
|
Modifier and Type | Method and Description |
---|---|
Object |
execute(Object value,
CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.
|
toString, validateInputNotNull
public StrMinMax(long min, long max)
min
- the minimum String lengthmax
- the maximum String lengthIllegalArgumentException
- if max < min
, or min is < 0
public StrMinMax(long min, long max, CellProcessor next)
min
- the minimum String lengthmax
- the maximum String lengthnext
- the next processor in the chainNullPointerException
- if next is nullIllegalArgumentException
- if max < min
, or min is < 0
public Object execute(Object value, CsvContext context)
execute
in interface CellProcessor
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is nullSuperCsvConstraintViolationException
- if length < min
or length > max
Copyright © 2007–2015 Super CSV. All rights reserved.