LineValidators and
run them against a single line.
This way complex validations can be performed.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if all validators'
LineValidator#isValid(String) methods return true,
false otherwise.String to be validated. line)Runs all LineValidators' |
| pack-priv void | setValidators(List<LineValidator>
- list of validators to use. validators)Setter created for unit test. |
| public void |
| CAPACITY | back to summary |
|---|---|
| private static final int CAPACITY | |
| MULTIPLIER | back to summary |
|---|---|
| private static final int MULTIPLIER | |
| validators | back to summary |
|---|---|
| private List<LineValidator> validators | |
| LineValidatorAggregator | back to summary |
|---|---|
| public LineValidatorAggregator() Default constructor. | |
| addValidator | back to summary |
|---|---|
| public void addValidator(LineValidator validator) Add an validator to the aggregator.
| |
| isValid | back to summary |
|---|---|
| public boolean isValid(final String line) Runs all LineValidators'
| |
| setValidators | back to summary |
|---|---|
| pack-priv void setValidators(List<LineValidator> validators) Setter created for unit test.
| |
| validate | back to summary |
|---|---|
| public void validate(String line) throws CsvValidationException Runs all LineValidators validate commands and if the string is invalid then it combines all the validation error messages in a single CsvValidationException.
| |