PathExpander (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<Relationship>` | `expand(Path path, BranchState<STATE> state)` Returns relationships for a `Path`, most commonly from the `Path.endNode()`.
    `PathExpander<STATE>` | `reverse()` Returns a new instance with the exact expansion logic, but reversed.

- - ### Method Detail

    - #### expand

          Iterable<Relationship> expand(Path path,
                                      BranchState<STATE> state)

      Returns relationships for a `Path`, most commonly from the `Path.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 and `BranchState.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. TODO example
      Returns:
        a reversed `PathExpander`.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.