org.simpleflatmapper.converter.AbstractContextualConverterFactoryProducer 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 AbstractContextualConverterFactoryProducer implements ContextualConverterFactoryProducer {
protected void constantConverter(
Consumer super ContextualConverterFactory, ?>> consumer,
Class from,
Class to,
ContextualConverter converter) {
consumer.accept(new ConstantContextualConverterFactory(new ConvertingTypes(from, to), converter));
}
protected void factoryConverter(
Consumer super ContextualConverterFactory, ?>> consumer,
ContextualConverterFactory, ?> converterFactory) {
consumer.accept(converterFactory);
}
}