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

net.sf.javagimmicks.transform.DualFunctionBidiFunction 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;



class DualFunctionBidiFunction extends AbstractBidiFunction
{
   protected final Function _transformer;
   protected final Function _backTransformer;

   public DualFunctionBidiFunction(final Function transformer, final Function backTransformer)
   {
      _transformer = transformer;
      _backTransformer = backTransformer;
   }

   @Override
   public F applyReverse(final T source)
   {
      return _backTransformer.apply(source);
   }

   @Override
   public T apply(final F source)
   {
      return _transformer.apply(source);
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy