net.sf.javagimmicks.collections8.transformer.TransformingConsumer 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.collections8.transformer;
import java.util.function.Consumer;
import java.util.function.Function;
import net.sf.javagimmicks.transform8.Transforming;
class TransformingConsumer implements Transforming, Consumer
{
protected final Consumer super T> _internalConsumer;
private final Function _transformer;
TransformingConsumer(Consumer super T> _internalConsumer, Function _transformer)
{
this._internalConsumer = _internalConsumer;
this._transformer = _transformer;
}
@Override
public void accept(F f)
{
_internalConsumer.accept(_transformer.apply(f));
}
@Override
public Function getTransformerFunction()
{
return _transformer;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy