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

cz.jalasoft.lifeconfig.converter.Converters Maven / Gradle / Ivy

package cz.jalasoft.lifeconfig.converter;

/**
 * @author Honza Lastovicka ([email protected])
 * @since 2016-09-20.
 */
public class Converters {

    public static Converter identity(Class type) {
        return new Converter() {
            @Override
            public Object convert(Object from) throws ConverterException {
                return from;
            }

            @Override
            public Class sourceType() {
                return type;
            }

            @Override
            public Class targetType() {
                return type;
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy