org.apache.tinkerpop.gremlin.ogm.mappers.BiMapper.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-gremlin-ogm Show documentation
Show all versions of kotlin-gremlin-ogm Show documentation
The Object Graph Mapping Library for Kotlin and Gremlin
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