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