org.simpleflatmapper.converter.AbstractConverterFactoryProducer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-converter Show documentation
Show all versions of sfm-converter Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.converter;
import org.simpleflatmapper.util.Consumer;
public abstract class AbstractConverterFactoryProducer implements ConverterFactoryProducer {
protected void constantConverter(
Consumer super ConverterFactory, ?>> consumer,
Class from,
Class to,
Converter converter) {
consumer.accept(new ConstantConverterFactory(new ConvertingTypes(from, to), converter));
}
protected void factoryConverter(
Consumer super ConverterFactory, ?>> consumer,
ConverterFactory, ?> converterFactory) {
consumer.accept(converterFactory);
}
}