cz.jalasoft.util.converter.Converter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JalasoftUtils Show documentation
Show all versions of JalasoftUtils Show documentation
A collection of utility classes that might be useful.
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();
}