Top Description Methods
com.opencsv.bean

public Interface BeanVerifier<T>

Type Parameters
<T>
The type of bean being verified
Imports
com.opencsv.exceptions.CsvConstraintViolationException

Classes implementing this interface may be used to verify and filter beans after creation, but before being passed back to the calling application. This is fully intended as a replacement for CsvToBeanFilter.

Implementations of this interface must be thread-safe.

Author
Andrew Rucker Jones
Since
4.4

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the bean should be passed on to further processing, false if it should be silently filtered
verifyBean
(T
The bean to be verified
bean
)

Verifies and optionally filters the bean that has been created.

Method Detail

verifyBeanback to summary
public boolean verifyBean(T bean) throws CsvConstraintViolationException

Verifies and optionally filters the bean that has been created. This method throws CsvConstraintViolationException if the bean created is in some way inconsistent and thus unacceptable. If, however, the bean is essentially correct, but for some logical reason should be filtered silently out, the method should return false.

Parameters
bean:T

The bean to be verified

Returns:boolean

true if the bean should be passed on to further processing, false if it should be silently filtered

Exceptions
CsvConstraintViolationException:
If the bean that has been created is in some way logically inconsistent or impossible. This exception will be propagated up the call stack and, depending on how opencsv is being used, may simply be reported, or may halt execution.