org.fastnate.data.csv.CsvCharacterConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastnate-data Show documentation
Show all versions of fastnate-data Show documentation
The Fastnate Data Importer for offline SQL generation
package org.fastnate.data.csv;
/**
* Converts a string from a CSV file to a {@link Character}.
*
* @author Tobias Liefke
*/
public class CsvCharacterConverter implements CsvPropertyConverter {
@Override
public Character convert(final Class extends Character> targetType, final String value) {
return value == null || value.length() == 0 ? null : value.charAt(0);
}
}