public class PreorderBreadthFirstSelector extends Object implements BranchSelector
TraversalBranch
s according to breadth first
pattern, the most natural ordering in a breadth first search, see
http://en.wikipedia.org/wiki/Breadth-first_searchConstructor and Description |
---|
PreorderBreadthFirstSelector(TraversalBranch startSource,
PathExpander expander) |
Modifier and Type | Method and Description |
---|---|
TraversalBranch |
next(TraversalContext metadata)
Decides the next position ("where to go from here") from the current
position, based on the
rules . |
public PreorderBreadthFirstSelector(TraversalBranch startSource, PathExpander expander)
public TraversalBranch next(TraversalContext metadata)
BranchSelector
rules
. Since TraversalBranch
has the Path.endNode()
of the position and the
Path.lastRelationship()
to how it got there as well as
TraversalBranch#position()
, decisions
can be based on the current expansion source and the given rules.next
in interface BranchSelector
rules
of the traversal.Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.