All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.pipes.FunctionPipe Maven / Gradle / Ivy

Go to download

Pipes is a dataflow framework written in Java that enables the splitting, merging, filtering, and transformation of data from input to output. Computations are expressed using a combinator model and are evaluated in a memory-efficient, lazy fashion.

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.pipes;

/**
 * FunctionPipe is a generic pipe where the pipe's computation is determined by the provided PipeFunction.
 * Note that the PipeFunction.compute() takes the this.starts of the FunctionPipe.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class FunctionPipe extends AbstractPipe {

    private final PipeFunction function;

    public FunctionPipe(final PipeFunction function) {
        this.function = function;
    }

    public E processNextStart() {
        return (E) this.function.compute(this.starts);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy