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

cz.jalasoft.util.converter.Converter Maven / Gradle / Ivy

The newest version!
package cz.jalasoft.util.converter;

/**
 * A functional interface that does a conversion from
 * generic type F to generic type T.
 *
 * Created by Honza Lastovicka on 18.4.15.
 */
public interface Converter {

    /**
     * Converts from F to T
     * @param from must not be null
     * @return never null
     * @throws ConversionException if a problem occurred during the conversion
     * @throws java.lang.IllegalArgumentException if from is null
     */
    T convert(F from) throws ConversionException;

    Class sourceType();

    Class targetType();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy