com.github.thorbenkuck.network.pipeline.ConsumerWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easy-net Show documentation
Show all versions of easy-net Show documentation
An EventStream driven, simple to use Client/Server framework
package com.github.thorbenkuck.network.pipeline;
import java.util.function.Consumer;
import java.util.function.Function;
class ConsumerWrapper implements Function {
private final Consumer consumer;
ConsumerWrapper(Consumer consumer) {
this.consumer = consumer;
}
@Override
public T apply(T t) {
consumer.accept(t);
return t;
}
}