Package org.neo4j.graphdb.traversal
Interface TraversalContext
- All Superinterfaces:
TraversalMetadata
Provides a context for
TraversalBranch
es which they need to
move further and report their progress.-
Method Summary
Modifier and TypeMethodDescription<STATE> Evaluation
evaluate
(TraversalBranch branch, BranchState<STATE> state) Evaluates aTraversalBranch
whether or not to include it in the result and whether or not to continue further down this branch or not.boolean
isUnique
(TraversalBranch branch) Used for all except branches to check adherence to the traversal uniqueness.boolean
isUniqueFirst
(TraversalBranch branch) Used for start branches to check adherence to the traversal uniqueness.void
Reports that one more relationship has been traversed in this traversal.void
Reports that one more relationship has been traversed, albeit a relationship that hasn't provided any benefit to the traversal.Methods inherited from interface org.neo4j.graphdb.traversal.TraversalMetadata
getNumberOfPathsReturned, getNumberOfRelationshipsTraversed
-
Method Details
-
relationshipTraversed
void relationshipTraversed()Reports that one more relationship has been traversed in this traversal. -
unnecessaryRelationshipTraversed
void unnecessaryRelationshipTraversed()Reports that one more relationship has been traversed, albeit a relationship that hasn't provided any benefit to the traversal. -
isUniqueFirst
Used for start branches to check adherence to the traversal uniqueness.- Parameters:
branch
- theTraversalBranch
to check for uniqueness.- Returns:
true
if the branch is considered unique and is allowed to progress in this traversal.
-
isUnique
Used for all except branches to check adherence to the traversal uniqueness.- Parameters:
branch
- theTraversalBranch
to check for uniqueness.- Returns:
true
if the branch is considered unique and is allowed to progress in this traversal.
-
evaluate
Evaluates aTraversalBranch
whether or not to include it in the result and whether or not to continue further down this branch or not.- Type Parameters:
STATE
- the type of the state object.- Parameters:
branch
- theTraversalBranch
to evaluate.state
- theBranchState
for the branch.- Returns:
- an
Evaluation
of the branch in this traversal.
-