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

org.openstreetmap.atlas.utilities.conversion.TwoWayConverter Maven / Gradle / Ivy

The newest version!
package org.openstreetmap.atlas.utilities.conversion;

/**
 * Not only can convert from A type to B type, this interface supports backward convert from B to A
 * as well
 *
 * @param 
 *            The source type
 * @param 
 *            The target type
 * @author tony
 */
public interface TwoWayConverter extends Converter
{
    A backwardConvert(B object);

    default Converter revert()
    {
        return object -> backwardConvert(object);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy