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

com.github.skjolber.dc.gtfs.mt.StaticCsvMapperAdapter Maven / Gradle / Ivy

package com.github.skjolber.dc.gtfs.mt;

import java.io.Reader;

import com.github.skjolber.stcsv.CsvReader;
import com.github.skjolber.stcsv.databinder.StaticCsvMapper;
import com.github.skjolber.stcsv.databinder.StaticCsvMapper2;

public abstract class StaticCsvMapperAdapter implements StaticCsvMapper {

	protected StaticCsvMapper2 staticCsvMapper2;
	
	public StaticCsvMapperAdapter(StaticCsvMapper2 staticCsvMapper2) {
		this.staticCsvMapper2 = staticCsvMapper2;
	}

	@Override
	public CsvReader newInstance(Reader reader) {
		return staticCsvMapper2.newInstance(reader, newIntermediateProcessor());
	}

	@Override
	public CsvReader newInstance(Reader reader, char[] current, int offset, int length) {
		return staticCsvMapper2.newInstance(reader, current, offset, length, newIntermediateProcessor());
	}

	protected abstract D newIntermediateProcessor();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy