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

org.apache.tinkerpop.gremlin.ogm.mappers.BiMapper.kt Maven / Gradle / Ivy

There is a newer version: 0.21.0
Show newest version
package org.apache.tinkerpop.gremlin.ogm.mappers

/**
 * A function that is also able to map elements to its co-domain to its domain
 */
interface BiMapper {

    /**
     * Maps an object of type X to an object of type Y. It is expected that the value
     * returned by this function could be passed to [inverseMap] and an object equal to
     * 'from' would be returned.
     */
    fun forwardMap(from: X): Y

    /**
     * Maps an object of type Y to an object of type X. It is expected that the value
     * returned by this function could be passed to [forwardMap] and an object equal to
     * 'from' would be returned.
     */
    fun inverseMap(from: Y): X
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy