Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.graphdb.traversal
Interface TraversalBranch

    public interface TraversalBranch

Represents a `position` and a `RelationshipExpander` with a traversal context, for example parent and an iterator of relationships to go next. It's a base to write a `BranchSelector` on top of.

Method Summary
`int` | `depth()` The depth for this expansion source compared to the start node of the traversal.
`int` | `expanded()` Returns the number of relationships this expansion source has expanded.
`TraversalBranch` | `next()` Returns the next expansion source from the expanded relationships from the current node.
`Node` | `node()` The node for this expansion source.
`TraversalBranch` | `parent()` The parent expansion source which created this `TraversalBranch`.
`Path` | `position()` The position represented by this expansion source.
`Relationship` | `relationship()` The relationship for this expansion source.

Method Detail

### parent

    TraversalBranch parent()

  The parent expansion source which created this `TraversalBranch`.

  Returns:
    the parent of this expansion source.

### position

    Path position()

  The position represented by this expansion source.

  Returns:
    the position represented by this expansion source.

### depth

    int depth()

  The depth for this expansion source compared to the start node of the traversal.

  Returns:
    the depth of this expansion source.

### node

    Node node()

  The node for this expansion source.

  Returns:
    the node for this expansion source.

### relationship

    Relationship relationship()

  The relationship for this expansion source. It's the relationship which was traversed to get to this expansion source.

  Returns:
    the relationship for this expansion source.

### next

    TraversalBranch next()

  Returns the next expansion source from the expanded relationships from the current node.

  Returns:
    the next expansion source from this expansion source.

### expanded

    int expanded()

  Returns the number of relationships this expansion source has expanded. In this count isn't included the relationship which led to coming here (since that could also be traversed, although skipped, when expanding this source).

  Returns:
    the number of relationships this expansion source has expanded.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Neo4j. All Rights Reserved.