Search in sources :

Example 1 with PipesFunction

use of com.tinkerpop.pipes.util.PipesFunction in project gremlin by tinkerpop.

the class TransformStepTest method test_g_V_asXaX_out_transformXa_nameX.

public void test_g_V_asXaX_out_transformXa_nameX() {
    super.test_g_V_asXaX_out_transformXa_nameX(new GremlinPipeline(g).V().as("a").out().transform(new PipesFunction() {

        public Object compute(Object argument) {
            return ((Vertex) this.asMap.get("a")).getProperty("name");
        }
    }));
    super.test_g_V_asXaX_out_transformXa_nameX(new GremlinPipeline(g.getVertices()).optimize(false).as("a").out().transform(new PipesFunction() {

        public Object compute(Object argument) {
            return ((Vertex) this.asMap.get("a")).getProperty("name");
        }
    }));
}
Also used : Vertex(com.tinkerpop.blueprints.Vertex) GremlinPipeline(com.tinkerpop.gremlin.java.GremlinPipeline) PipesFunction(com.tinkerpop.pipes.util.PipesFunction)

Aggregations

Vertex (com.tinkerpop.blueprints.Vertex)1 GremlinPipeline (com.tinkerpop.gremlin.java.GremlinPipeline)1 PipesFunction (com.tinkerpop.pipes.util.PipesFunction)1