io.virtdata.api.composers.ComposerForFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
package io.virtdata.api.composers;
import io.virtdata.api.FunctionType;
import io.virtdata.api.ValueType;
import java.util.function.*;
public class ComposerForFunction implements FunctionComposer> {
private final Function,?> inner;
public ComposerForFunction(Function, ?> inner) {
this.inner = inner;
}
@Override
public Object getFunctionObject() {
return inner;
}
@Override
@SuppressWarnings("unchecked")
public FunctionComposer andThen(Object outer) {
FunctionType functionType = FunctionType.valueOf(outer);
Object outv = ((Function