Scads of methods that had to do with the internal implementation details of a mapping strategy have been removed from the interface MappingStrategy. CsvToBean itself is iterable use it instead. IterableCSVToBean and IterableCSVToBeanBuilder have both been removed. It might be advantageous to you to use this base class.Īll non-essential constructors and CsvToBean.parse() methods have been removed. HeaderColumnNameMappingStrategy or HeaderColumnNameTranslateMappingStrategy, If you have derived a mapping strategy from UnsupportedOperationException, and all relevant builders include methods forįeeding this information to the mapping strategy.Īs a byproduct of refactoring the mapping strategies, there is now a baseĬlass for mapping strategies that map header names: This last has aĭefault implementation in the MappingStrategy interface that throws an Over the beans you use, with MappingStrategy.ignoreFields(). With the new annotation or, if you do not have source control
You can now instruct opencsv to ignore fields. "serialVersionUID" as long as the bean class implements Serializable. Without annotations, opencsv will now ignore any field named If you write beans to a CSV output using the header name mapping strategy Variables of multiple embedded beans has been added through the One root bean is still necessary. The ability to split mappings from input/output columns to member Names to reduce your burden in annotating beans. Uses a fuzzy matching algorithm between header names and member variable Similarly, and can now take a different format forĪ new mapping strategy (FuzzyMappingStrategy) for reading into beans that To stipulate a different conversion locale for writing than the one used for In all annotations that accepted a conversion locale, it is now possible Conversion to and fromĪll JDK-types that implement TemporalAccessor is included. Similarly, StatefulBeanToCsv now accepts a Stream to a new write() method.įull support for the Java 8 Time API is included. To a new list, it saves a smidgen of time and space. Can I get the source? More example code?ĬsvToBean now has a stream() method to allow you to gracefully continue.Can I use opencsv in my commercial applications?.StringProcessor and PreAssignmentProcessor.StringValidator and PreAssignmentValidator.Skipping, filtering, verifying, and ignoring.
MultiValuedMap-based bean fields (many-to-one mappings).Collection-based bean fields (one-to-many mappings).