package org.simpleflatmapper.csv.impl.primitive; import org.simpleflatmapper.csv.mapper.BreakDetector; import org.simpleflatmapper.csv.mapper.CsvMapperCellConsumer; import org.simpleflatmapper.csv.mapper.DelayedCellSetter; import org.simpleflatmapper.csv.mapper.DelayedCellSetterFactory; import org.simpleflatmapper.csv.impl.cellreader.CharCellValueReader; import org.simpleflatmapper.reflect.primitive.CharacterSetter; public class CharDelayedCellSetterFactory<T> implements DelayedCellSetterFactory<T, Character> { private final CharacterSetter<? super T> setter; private final CharCellValueReader reader; public CharDelayedCellSetterFactory(CharacterSetter<? super T> setter, CharCellValueReader reader) { this.setter = setter; this.reader = reader; } @Override public DelayedCellSetter<T, Character> newCellSetter(BreakDetector breakDetector, CsvMapperCellConsumer<?>[] cellHandlers) { return new CharDelayedCellSetter<T>(setter, reader); } @Override public boolean hasSetter() { return setter != null; } @Override public String toString() { return "CharDelayedCellSetterFactory{" + "setter=" + setter + ", reader=" + reader + '}'; } }