public abstract class SimpleFunction<InputT,OutputT> extends InferableFunction<InputT,OutputT> implements SerializableFunction<InputT,OutputT>
SerializableFunction
which is not a functional interface. Concrete subclasses
allow us to infer type information, which in turn aids Coder
inference.Modifier | Constructor and Description |
---|---|
protected |
SimpleFunction() |
protected |
SimpleFunction(SerializableFunction<InputT,OutputT> fn) |
Modifier and Type | Method and Description |
---|---|
OutputT |
apply(InputT input)
Returns the result of invoking this function on the given input.
|
static <InputT,OutputT> |
fromSerializableFunctionWithOutputType(SerializableFunction<InputT,OutputT> fn,
TypeDescriptor<OutputT> outputType) |
fromProcessFunctionWithOutputType, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData
protected SimpleFunction()
protected SimpleFunction(SerializableFunction<InputT,OutputT> fn)
public OutputT apply(InputT input)
ProcessFunction
apply
in interface ProcessFunction<InputT,OutputT>
apply
in interface SerializableFunction<InputT,OutputT>
apply
in class InferableFunction<InputT,OutputT>
public static <InputT,OutputT> SimpleFunction<InputT,OutputT> fromSerializableFunctionWithOutputType(SerializableFunction<InputT,OutputT> fn, TypeDescriptor<OutputT> outputType)