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

com.tinkerpop.pipes.transform.TransformFunctionPipe 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.transform;

import com.tinkerpop.pipes.AbstractPipe;
import com.tinkerpop.pipes.PipeFunction;

/**
 * TransformFunctionPipe computes a transformation on the S object, where the PipeFunction determines the E.
 * The first parameter of the PipeFunction is the S of the pipe.
 * The results of the PipeFunction is the E of the pipe.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class TransformFunctionPipe extends AbstractPipe implements TransformPipe {

    private final PipeFunction transformFunction;

    public TransformFunctionPipe(final PipeFunction transformFunction) {
        this.transformFunction = transformFunction;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy