net.sf.javagimmicks.transform.BidiFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.transform;
import net.sf.javagimmicks.util.Function;
/**
* A bidirectional version of {@link Function} that is able to transform objects
* back into their original value and/or format.
*/
public interface BidiFunction extends Function
{
/**
* Transforms a give (transformed object) back into the source value and/or
* format.
*
* @param source
* the source object to be transformed back
* @return the back-transformed object
*/
public F applyReverse(T source);
/**
* Returns a new {@link BidiFunction} that transforms in exactly the
* different directions.
*
* @return an inverted version of this {@link BidiFunction}
*/
public BidiFunction invert();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy