use of com.tinkerpop.pipes.util.structures.Pair in project gremlin by tinkerpop.
the class OrderStepTest method test_g_V_orderXa_nameXb_nameX_name.
public void test_g_V_orderXa_nameXb_nameX_name() {
super.test_g_V_orderXa_nameXb_nameX_name(new GremlinPipeline(g.getVertices()).order(new PipeFunction<Pair<Vertex, Vertex>, Integer>() {
public Integer compute(Pair<Vertex, Vertex> argument) {
return ((String) argument.getB().getProperty("name")).compareTo((String) argument.getA().getProperty("name"));
}
}).property("name"));
super.test_g_V_orderXa_nameXb_nameX_name(new GremlinPipeline(g.getVertices()).optimize(false).order(new PipeFunction<Pair<Vertex, Vertex>, Integer>() {
public Integer compute(Pair<Vertex, Vertex> argument) {
return ((String) argument.getB().getProperty("name")).compareTo((String) argument.getA().getProperty("name"));
}
}).property("name"));
}
Aggregations