本文整理了Java中org.apache.tinkerpop.gremlin.process.traversal.Traversal.toSet()
方法的一些代码示例,展示了Traversal.toSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Traversal.toSet()
方法的具体详情如下:
包路径:org.apache.tinkerpop.gremlin.process.traversal.Traversal
类名称:Traversal
方法名:toSet
[英]Put all the results into a HashSet.
[中]将所有结果放入哈希集中。
代码示例来源:origin: apache/tinkerpop
final Set<Integer> set = intTraversal.toSet();
assertFalse(intTraversal.hasNext());
assertEquals(4, set.size());
代码示例来源:origin: org.jboss.windup.web.addons/windup-web-support-impl
@Override
public List<Map<String, Object>> getByType(Long executionID, String vertexType, String propertyName, String propertyValue, Integer depth, Boolean dedup, Boolean includeInVertices)
{
GraphContext graphContext = getGraph(executionID);
List<Map<String, Object>> vertices = new ArrayList<>();
Traversal<Vertex, Vertex> query = graphContext.getGraph().traversal().V().has(WindupVertexFrame.TYPE_PROP, vertexType).has(propertyName, propertyValue);
for (Vertex vertex : query.toSet())
{
vertices.add(convertToMap(new GraphMarshallingContext(executionID, vertex, depth, dedup, null, null, null, includeInVertices), vertex));
}
return vertices;
}
代码示例来源:origin: org.apache.tinkerpop/gremlin-test
final Set<Integer> set = intTraversal.toSet();
assertFalse(intTraversal.hasNext());
assertEquals(4, set.size());
内容来源于网络,如有侵权,请联系作者删除!