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

net.sf.javagimmicks.collections8.transformer.TransformingConsumer Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
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 _internalConsumer;
   private final Function _transformer;   
   
   TransformingConsumer(Consumer _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