Package org.neo4j.graphdb.traversal
Interface UniquenessFilter
public interface UniquenessFilter
Interface for filters preventing the traversal from visiting already seen parts of the graph. Implementations can
allow for different heuristics to use to determine what may be re-visited.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
check
(TraversalBranch branch) Checks whether or notbranch
is unique, and hence can be visited in this traversal.boolean
checkFirst
(TraversalBranch branch) The check whether or not to expand the first branch is a separate method because it may contain checks which would be unnecessary for all other checks.
-
Method Details
-
checkFirst
The check whether or not to expand the first branch is a separate method because it may contain checks which would be unnecessary for all other checks. So it's purely an optimization.- Parameters:
branch
- the first branch to check, i.e. the branch representing the start node in the traversal.- Returns:
- whether or not
branch
is unique, and hence can be visited in this traversal.
-
check
Checks whether or notbranch
is unique, and hence can be visited in this traversal.- Parameters:
branch
- theTraversalBranch
to check for uniqueness.- Returns:
- whether or not
branch
is unique, and hence can be visited in this traversal.
-