com.tecacet.util.conversion.LocalDateConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jflat Show documentation
Show all versions of jflat Show documentation
JFlat's purpose is to convert flat files to Java Beans and vice versa.
Some supported formats are CSV, fixed-width, arbitrary delimiters, and excel files.
There are also tools to generate Java Beans to/from JDBC and Swing tables.
JFlat is highly extensible and can be adopted to support additional formats.
The newest version!
package com.tecacet.util.conversion;
import org.joda.time.LocalDate;
import com.tecacet.util.conversion.commons.CommonsLocalDateConverter;
public class LocalDateConverter implements DataConverter{
private final CommonsLocalDateConverter commonsConverter;
public LocalDateConverter(String dateFormatString) {
super();
this.commonsConverter = new CommonsLocalDateConverter(dateFormatString);
}
public LocalDateConverter(String[] dateFormatStrings) {
super();
this.commonsConverter = new CommonsLocalDateConverter(dateFormatStrings);
}
@Override
public LocalDate convert(String from) {
return (LocalDate) commonsConverter.convert(LocalDate.class, from);
}
}