public class LineValidatorAggregator extends Object
| Constructor and Description |
|---|
LineValidatorAggregator()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValidator(LineValidator validator)
Add an validator to the aggregator.
|
boolean |
isValid(String line)
Runs all LineValidators isValid command against the line.
|
void |
validate(String line)
Runs all LineValdators validate commands and if the string is invalid then it combines all the validation error
messages in a single CsvValidationException.
|
public void addValidator(LineValidator validator)
validator - - validator to be added.public boolean isValid(String line)
line - - string to be validated.public void validate(String line) throws CsvValidationException
line - - string to be validation.CsvValidationException - - thrown if the string is invalid.Copyright © 2019. All rights reserved.