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

com.tinkerpop.gremlin.groovy.engine.function.GSBiConsumer Maven / Gradle / Ivy

package com.tinkerpop.gremlin.groovy.engine.function;

import com.tinkerpop.gremlin.util.function.SBiConsumer;

import javax.script.ScriptException;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class GSBiConsumer extends GLambda implements SBiConsumer {

    public GSBiConsumer(final String gremlinGroovyScript) {
        super(gremlinGroovyScript);
    }

    public void accept(final A a, B b) {
        try {
            engine.eval(this.gremlinGroovyScript, makeBindings(a, b));
        } catch (final ScriptException e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy