org.simpleflatmapper.csv.CsvColumnKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-csv Show documentation
Show all versions of sfm-csv Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
The newest version!
package org.simpleflatmapper.csv;
import org.simpleflatmapper.map.FieldKey;
import java.lang.reflect.Type;
public final class CsvColumnKey extends FieldKey {
public CsvColumnKey(String name, int index) {
super(name, index);
}
public CsvColumnKey(String name, int index, CsvColumnKey parent) {
super(name, index, parent);
}
@Override
public Type getType(Type targetType) {
return CharSequence.class;
}
public CsvColumnKey alias(String name) {
return new CsvColumnKey(name, index, this);
}
@Override
public String toString() {
return "CsvColumnKey{" +
"name='" + name + '\'' +
", index=" + index +
'}';
}
}