org.simpleflatmapper.map.fieldmapper.LongFieldMapper Maven / Gradle / Ivy
package org.simpleflatmapper.map.fieldmapper;
import org.simpleflatmapper.map.FieldMapper;
import org.simpleflatmapper.map.MappingContext;
import org.simpleflatmapper.reflect.primitive.LongGetter;
import org.simpleflatmapper.reflect.primitive.LongSetter;
public final class LongFieldMapper implements FieldMapper {
private final LongGetter super S> getter;
private final LongSetter super T> setter;
public LongFieldMapper(final LongGetter super S> getter, final LongSetter super T> setter) {
this.getter = getter;
this.setter = setter;
}
@Override
public void mapTo(final S source, final T target, final MappingContext super S> mappingContext) throws Exception {
setter.setLong(target, getter.getLong(source));
}
@Override
public String toString() {
return "LongFieldMapper{" +
"getter=" + getter +
", setter=" + setter +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy