Interface VertexTraversal
- All Superinterfaces:
VertexConditionTraversal
The Graph Traversal that maps
Vertex.
This Traversal is lazy, in other words, that just run after any finalizing method.-
Method Summary
Modifier and TypeMethodDescriptionMap theEdgeTraversalto its either incoming or outgoing incident edges given the edge labels.default EdgeTraversalMap theEdgeTraversalto its either incoming or outgoing incident edges given the edge labels.longcount()Map the traversal next to its reduction as a sum of the elementsRemove all duplicates in the traversal stream up to this point.<T> VertexTraversalDoes a filter predicate basedMap theEdgeTraversalto its incoming incident edges given the edge labels.default EdgeTraversalMap theEdgeTraversalto its incoming incident edges given the edge labels.limit(long limit) Filter the objects in the traversal by the number of them to pass through the next, where only the firstnobjects are allowed as defined by thelimitargument.<T> Optional<T>next()Returns the next elements in the traversal.<T> Stream<T>next(int limit) Get the next n-number of results from the traversal.Defines the order of the Vertex, the property must have in all elements.Map theEdgeTraversalto its outgoing incident edges given the edge labels.default EdgeTraversalMap theEdgeTraversalto its outgoing incident edges given the edge labels.range(long start, long end) Returns a VertexTraversal with range definedrepeat()Starts the loop traversal graph<T> Stream<T>result()Get all the result in the traversal as Stream<T> Optional<T>Concludes the traversal that returns a single resultskip(long skip) Filters out the firstnobjects in the traversal.
-
Method Details
-
filter
Does a filter predicate based- Type Parameters:
T- the type- Parameters:
predicate- a predicate to apply to each element to determine if it should be included- Returns:
- a
EdgeTraversalwith the Vertex predicate - Throws:
NullPointerException- when predicate is null
-
outE
Map theEdgeTraversalto its outgoing incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
inE
Map theEdgeTraversalto its incoming incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
bothE
Map theEdgeTraversalto its either incoming or outgoing incident edges given the edge labels.- Parameters:
edgeLabels- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
dedup
Remove all duplicates in the traversal stream up to this point.- Parameters:
labels- if labels are provided, then the scoped object's labels determine de-duplication. No labels implies current object.- Returns:
- the traversal with an appended
DedupGlobalStep.
-
repeat
VertexRepeatTraversal repeat()Starts the loop traversal graph- Returns:
- a
VertexRepeatTraversal
-
outE
Map theEdgeTraversalto its outgoing incident edges given the edge labels.- Parameters:
label- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
inE
Map theEdgeTraversalto its incoming incident edges given the edge labels.- Parameters:
label- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
bothE
Map theEdgeTraversalto its either incoming or outgoing incident edges given the edge labels.- Parameters:
label- the edge labels to traverse- Returns:
- a
EdgeTraversalwith the new condition - Throws:
NullPointerException- when has any null element
-
limit
Filter the objects in the traversal by the number of them to pass through the next, where only the firstnobjects are allowed as defined by thelimitargument.- Parameters:
limit- the number at which to end the next- Returns:
- a VertexTraversal with the limit
-
skip
Filters out the firstnobjects in the traversal.- Parameters:
skip- the number of objects to skip- Returns:
- a VertexTraversal with skip
-
range
Returns a VertexTraversal with range defined- Parameters:
start- the start inclusiveend- the end exclusive- Returns:
- a with the range set
-
next
Returns the next elements in the traversal. If the traversal is empty, then anOptional.empty()is returned.- Type Parameters:
T- the entity type- Returns:
- the entity result otherwise
Optional.empty()
-
result
Get all the result in the traversal as Stream- Type Parameters:
T- the entity type- Returns:
- the entity result as
Stream
-
singleResult
Concludes the traversal that returns a single result- Type Parameters:
T- the type- Returns:
- the entity result otherwise
Optional.empty()
-
next
Get the next n-number of results from the traversal.- Type Parameters:
T- the entity type- Parameters:
limit- the limit to result- Returns:
- the entity result as
Stream
-
valueMap
Map theElementto aMapof the properties key'd according to theirProperty.key(). If no property keys are provided, then all properties are retrieved.- Parameters:
propertyKeys- the properties to retrieve- Returns:
- a
ValueMapTraversalinstance
-
count
long count()Map the traversal next to its reduction as a sum of the elements- Returns:
- the sum
-
orderBy
Defines the order of the Vertex, the property must have in all elements. Otherwise, it'll return an exception, as recommendation useVertexConditionTraversal.has(String)before this method- Parameters:
property- the property to be order- Returns:
- the
VertexTraversalOrderto define the order way - Throws:
NullPointerException- when the property is nullIllegalStateException- when there any Edge that does not have the property
-