Package org.neo4j.graphdb
Interface PathExpander<STATE>
public interface PathExpander<STATE>
An expander of relationships. It's a flexible way of getting relationships
from a
Path
. Given a path, which relationships should be expanded
from it to traverse further.-
Method Summary
Modifier and TypeMethodDescriptionexpand
(Path path, BranchState<STATE> state) Returns relationships for aPath
, most commonly from thePath.endNode()
.reverse()
Returns a new instance with the exact expansion logic, but reversed.
-
Method Details
-
expand
Returns relationships for aPath
, most commonly from thePath.endNode()
.- Parameters:
path
- the path to expand (most commonly the end node).state
- the state of this branch in the current traversal.BranchState.getState()
returns the state andBranchState.setState(Object)
optionally sets the state for the children of this branch. If state isn't altered the children of this path will see the state of the parent.- Returns:
- the relationships to return for the
path
.
-
reverse
PathExpander<STATE> reverse()Returns a new instance with the exact expansion logic, but reversed.- Returns:
- a reversed
PathExpander
.
-