Commit 2ee35661 authored by R.W.Majeed's avatar R.W.Majeed

read only transformation

parent 62a96633
package de.sekmi.histream.io.transform;
import java.util.function.Consumer;
import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationHandler;
/**
* Use {@link ObservationHandler} in {@link Transformation}.
* Bridge between {@link ObservationHandler} and {@link Transformation}.
*
* @author R.W.Majeed
*
*/
public class ReadOnlyTransformation implements Transformation {
private ObservationHandler handler;
public ReadOnlyTransformation(ObservationHandler handler){
this.handler = handler;
}
@Override
public Observation transform(Observation fact, Consumer<Observation> generatedReceiver) {
handler.accept(fact);
return fact;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment