io.virtdata.libbasics.shared.functionadapters.Flow 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.libbasics.shared.functionadapters;
import io.virtdata.annotations.Categories;
import io.virtdata.annotations.Category;
import io.virtdata.annotations.ThreadSafeMapper;
import io.virtdata.api.composers.FunctionAssembly;
import io.virtdata.api.composers.FunctionComposer;
import io.virtdata.core.ResolvedFunction;
import io.virtdata.util.VirtDataFunctions;
import java.util.function.LongFunction;
/**
* Combine functions into one.
*
* This function allows you to combine multiple other functions into one. This is often useful
* for constructing more sophisticated recipes, when you don't have the ability to use
* control flow or non-functional forms.
*
* The functions will be stitched together using the same logic that VirtData uses when
* combining flows outside functions. That said, if the functions selected are not the right ones,
* then it is possible to end up with the wrong data type at the end. To remedy this, be sure
* to add input and output qualifiers, like long->
or ->String
where
* appropriate, to ensure that VirtData selects the right functions within the flow.
*/
@Categories(Category.conversion)
@ThreadSafeMapper
public class Flow implements LongFunction