All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.simpleflatmapper.csv.CsvColumnKey Maven / Gradle / Ivy

Go to download

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 +
				'}';
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy