Functional chain in Java - grant-guo/Ideas GitHub Wiki
import org.apache.commons.lang3.tuple.Triple;
@FunctionalInterface
public interface TriFunction<A, B, C> {
Triple<A, B, C> apply(A a, B b, C c) ;
default TriFunction<A, B, C> andThen(TriFunction<A, B, C> after) {
return (A a, B b, C c) -> {
Triple<A, B, C> ret = apply(a, b, c);
return after.apply(ret.getLeft(), ret.getMiddle(), ret.getRight());
};
}
}