/** * Populates the field corresponding to the column position indicated of the * bean passed in according to the rules of the mapping strategy. * This method performs conversion on the input string and assigns the * result to the proper field in the provided bean. * * @param bean Object containing the field to be set. * @param value String containing the value to set the field to. * @param column The column position from the CSV file under which this * value was found. * @throws CsvDataTypeMismatchException When the result of data conversion returns * an object that cannot be assigned to the selected field * @throws CsvRequiredFieldEmptyException When a field is mandatory, but there is no * input datum in the CSV file * @throws CsvConstraintViolationException When the internal structure of * data would be violated by the data in the CSV file * @since 4.2 */ protected void setFieldValue(T bean, String value, int column) throws CsvDataTypeMismatchException, CsvRequiredFieldEmptyException, CsvConstraintViolationException { BeanField<T> beanField = findField(column); if (beanField != null) { beanField.setFieldValue(bean, value, findHeader(column)); } }