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

net.sf.javagimmicks.transform.BidiFunction Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
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