public interface RowValidator
String
s read by
the CSVReader
after it is processed.
This should only be used if you have a very good understanding and full
control of the data being processed. Good examples of a RowValidator would
be to ensure the number of columns in the row or, if you know what data are
in which column, check the format and type of data.Modifier and Type | Method and Description |
---|---|
boolean |
isValid(String[] row)
Performs the validation check on the string and returns the result.
|
void |
validate(String[] row)
Performs the validation check on the row (an array of
String s)
and throws an exception if invalid. |
boolean isValid(String[] row)
row
- Array of strings to be validatedtrue
if the row is valid, false
otherwisevoid validate(String[] row) throws CsvValidationException
String
s)
and throws an exception if invalid.row
- Array of String
s to be validated.CsvValidationException
- Thrown if invalid. Should contain a
message describing the error.Copyright © 2005–2023. All rights reserved.