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

com.fredericboisguerin.excel.converter.AbstractConverter Maven / Gradle / Ivy

The newest version!
package com.fredericboisguerin.excel.converter;

/**
 * Created by fboisguerin on 22/07/2015.
 */
abstract class AbstractConverter implements Converter {

    private final Class targetClass;

    protected AbstractConverter(Class targetClass) {
        this.targetClass = targetClass;
    }

    protected abstract T innerConvert(String s);

    public T convert(String s) throws ConverterException {
        try {
            return s == null ? null : innerConvert(s);
        } catch (Exception e) {
            throw new ConverterException(s, targetClass, e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy