TraversalContext (Neo4j Community 1.8.RC1 API)
Date: 2012-09-07

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

## org.neo4j.graphdb.traversal
Interface TraversalContext

All Superinterfaces:
  TraversalMetadata

    public interface TraversalContext

extends TraversalMetadata

Provides a context for `TraversalBranch`es which they need to move further and report their progress.

Author:
  Mattias Persson

Method Summary
`Evaluation` | `evaluate(TraversalBranch branch)` Evaluates a `TraversalBranch` whether or not to include it in the result and whether or not to continue further down this branch or not.
`boolean` | `isUnique(TraversalBranch branch)` Used for all except branches to check adherence to the traversal uniqueness.
`boolean` | `isUniqueFirst(TraversalBranch branch)` Used for start branches to check adherence to the traversal uniqueness.
`void` | `relationshipTraversed()` Reports that one more relationship has been traversed in this traversal.
`void` | `unnecessaryRelationshipTraversed()` Reports that one more relationship has been traversed, albeit a relationship that hasn't provided any benefit to the traversal.

Methods inherited from interface org.neo4j.graphdb.traversal.TraversalMetadata
`getNumberOfPathsReturned, getNumberOfRelationshipsTraversed`

Method Detail

### relationshipTraversed

    void relationshipTraversed()

  Reports that one more relationship has been traversed in this traversal.

### unnecessaryRelationshipTraversed

    void unnecessaryRelationshipTraversed()

  Reports that one more relationship has been traversed, albeit a relationship that hasn't provided any benefit to the traversal.

### isUniqueFirst

    boolean isUniqueFirst(TraversalBranch branch)

  Used for start branches to check adherence to the traversal uniqueness.

  Parameters:
    `branch` - the `TraversalBranch` to check for uniqueness.
  Returns:
    `true` if the branch is considered unique and is allowed to progress in this traversal.

### isUnique

    boolean isUnique(TraversalBranch branch)

  Used for all except branches to check adherence to the traversal uniqueness.

  Parameters:
    `branch` - the `TraversalBranch` to check for uniqueness.
  Returns:
    `true` if the branch is considered unique and is allowed to progress in this traversal.

### evaluate

    Evaluation evaluate(TraversalBranch branch)

  Evaluates a `TraversalBranch` whether or not to include it in the result and whether or not to continue further down this branch or not.

  Parameters:
    `branch` - the `TraversalBranch` to evaluate.
  Returns:
    an `Evaluation` of the branch in this traversal.

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

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.