-
Notifications
You must be signed in to change notification settings - Fork 55
Pipe Types

There are 4 types of pipes.
-
Transform: take an object of type
Sand emit an object of typeE.TransformPipe<S,E> extends Pipe<S,E>
-
Filter: take an object of type
Sand either emit it or not.FilterPipe<S> extends Pipe<S,S>
-
Side-Effect: take an object of type
S, perform some computation, emit the same object.SideEffectPipe<S,T> extends Pipe<S,S>
- Branch: take an object and select any number of paths to send it down.
The packaging of Pipes is set up such that there is a transform, filter, sideeffect, and branch package. All pipes are instances of one of these 4 types. Moreover, each type has a special “function”-version known as a XXXFunctionPipe. For example: TransformFunctionPipe, FilterFunctionPipe, and SideEffectFunctionPipe. These pipes are discussed in their respective sections of the documentation. However, the general description of a PipeFunction is presented next.
Pipes has an interface called PipeFunction<A,B> that has the following methods:
public B compute(A argument);A pipe that takes a PipeFunction will use the provided compute() method at a particular point according to the semantics of the pipe. Thus, the JavaDoc of such pipes will articulate the meaning/use of the provided PipeFunction.