javadoc: order(com.tinkerpop.pipes.PipeFunction,Integer> compareFunction) 将OrderPipe添加到管道的末尾。
new GremlinPipeline<>()
.start(vtag)
.out(GraphHelper.EDGE_TYPE_OWNERSHIP, GraphHelper.EDGE_TYPE_PARTICIPATION)
.has("status",Activity.STATUS_OPEN)
.order(new PipeFunction<Pair<? extends Element, ? extends Element>, Integer>() {
@Override
public Integer compute(Pair<? extends Element, ? extends Element> argument) {
Long ret = (Long.parseLong(argument.getA().getProperty("postDate"))
- Long.parseLong(argument.getB().getProperty("postDate")));
return ret.intValue();
}
})
.range(start, start + size)
.iterator().forEachRemaining(v ->
activities.add(getActivity(v.getId().toString(), null, AccessType.OWNER, false))
);
虽然我可以看到我的ide提议方法并且它在javadocs中,但在编译时没有找到合适的方法时出错。
哪里出错?