public interface BidirectionalTraversalDescription
BidirectionalTraversalDescription
is immutable and each
method which adds or modifies the behavior returns a new instances that
includes the new modification, leaving the instance which returns the new
instance intact.
The interface is still experimental and may still change significantly.TraversalDescription
Modifier and Type | Method and Description |
---|---|
BidirectionalTraversalDescription |
collisionEvaluator(Evaluator collisionEvaluator)
Sets the
Evaluator to use for branch collisions. |
BidirectionalTraversalDescription |
collisionEvaluator(PathEvaluator collisionEvaluator)
Sets the
PathEvaluator to use for branch collisions. |
BidirectionalTraversalDescription |
collisionPolicy(BranchCollisionPolicy collisionDetection)
Sets the collision policy to use during this traversal.
|
BidirectionalTraversalDescription |
endSide(TraversalDescription endSideDescription)
Sets the end side
TraversalDescription of this bidirectional
traversal. |
BidirectionalTraversalDescription |
mirroredSides(TraversalDescription sideDescription)
Sets both the start side and end side of this bidirectional traversal,
the
start side is assigned the
sideDescription and the end side
is assigned the same description, although
reversed . |
BidirectionalTraversalDescription |
sideSelector(SideSelectorPolicy sideSelector,
int maxDepth)
In a bidirectional traversal the traverser alternates which side
(start or end) to move further for each step.
|
BidirectionalTraversalDescription |
startSide(TraversalDescription startSideDescription)
Sets the start side
TraversalDescription of this bidirectional
traversal. |
Traverser |
traverse(Iterable<Node> start,
Iterable<Node> end)
Traverse between a set of
start and end nodes with all
applied rules and behavior in this traversal description. |
Traverser |
traverse(Node start,
Node end)
Traverse between a given
start and end node with all
applied rules and behavior in this traversal description. |
BidirectionalTraversalDescription startSide(TraversalDescription startSideDescription)
TraversalDescription
of this bidirectional
traversal. The point of a bidirectional traversal is that the start
and end side will meet (or collide) in the middle somewhere and
generate paths evaluated and returned by this traversal.startSideDescription
- the TraversalDescription
to use
for the start side traversal.BidirectionalTraversalDescription endSide(TraversalDescription endSideDescription)
TraversalDescription
of this bidirectional
traversal. The point of a bidirectional traversal is that the start
and end side will meet (or collide) in the middle somewhere and
generate paths evaluated and returned by this traversal.endSideDescription
- the TraversalDescription
to use
for the end side traversal.BidirectionalTraversalDescription mirroredSides(TraversalDescription sideDescription)
start side
is assigned the
sideDescription
and the end side
is assigned the same description, although
reversed
. This will replace any
traversal description previously set by startSide(TraversalDescription)
or endSide(TraversalDescription)
.sideDescription
- the TraversalDescription
to use for both sides
of the bidirectional traversal. The end side will have it
reversed
BidirectionalTraversalDescription collisionPolicy(BranchCollisionPolicy collisionDetection)
TraversalBranch
es where start and end branches
meet and Path
s are generated from it.collisionDetection
- the BranchCollisionPolicy
to use during
this traversal.BidirectionalTraversalDescription collisionEvaluator(Evaluator collisionEvaluator)
Evaluator
to use for branch collisions. The outcome
returned from the evaluator affects the colliding branches.collisionEvaluator
- the Evaluator
to use for evaluating
branch collisions.BidirectionalTraversalDescription collisionEvaluator(PathEvaluator collisionEvaluator)
PathEvaluator
to use for branch collisions. The outcome
returned from the evaluator affects the colliding branches.collisionEvaluator
- the PathEvaluator
to use for evaluating
branch collisions.BidirectionalTraversalDescription sideSelector(SideSelectorPolicy sideSelector, int maxDepth)
SideSelectorPolicy
to use.sideSelector
- the SideSelectorPolicy
to use for this
traversal.maxDepth
- optional max depth parameter to the side selector.
Why is max depth a concern of the SideSelector
? Because it has
got knowledge of both the sides of the traversal at any given point.Traverser traverse(Node start, Node end)
start
and end
node with all
applied rules and behavior in this traversal description.
A Traverser
is returned which is used to step through the
graph and getting results back. The traversal is not guaranteed to
start before the Traverser is used.Traverser traverse(Iterable<Node> start, Iterable<Node> end)
start
and end
nodes with all
applied rules and behavior in this traversal description.
A Traverser
is returned which is used to step through the
graph and getting results back. The traversal is not guaranteed to
start before the Traverser is used.start
- set of nodes to use as starting points for the start
side in this traversal.end
- set of nodes to use as starting points for the end
side in this traversal.Traverser
used to step through the graph and to get
results from.Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.