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

org.neo4j.graphdb

## Interface ReturnableEvaluator

- Deprecated.
  because of the introduction of a new traversal framework, see more information at `TraversalDescription` and `Traversal` and the new traversal framework's equivalent `Predicate`.

      public interface ReturnableEvaluator

  A client hook for evaluating whether a specific node should be returned from a traverser.

  When a traverser is created the client parameterizes it with an instance of a ReturnableEvaluator. The traverser then invokes the `isReturnableNode()` operation just before returning a specific node, allowing the client to either approve or disapprove of returning that node.

  When implementing a ReturnableEvaluator, the client investigates the information encapsulated in a `TraversalPosition` to decide whether a node is returnable. For example, here's a snippet detailing a ReturnableEvaluator that will return all leaf nodes:

       ReturnableEvaluator returnEvaluator = new ReturnableEvaluator()
       {
           public boolean isReturnableNode( TraversalPosition position )
           {
               // Return nodes that don't have any outgoing relationships,
               // only incoming relationships, i.e. leaf nodes.
               return !position.currentNode().hasRelationship(
                   Direction.OUTGOING );
           }
       };

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ReturnableEvaluator` | `ALL` Deprecated. A returnable evaluator that returns all nodes encountered.
    `static ReturnableEvaluator` | `ALL_BUT_START_NODE` Deprecated. A returnable evaluator that returns all nodes except the start node.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isReturnableNode(TraversalPosition currentPos)` Deprecated. Method invoked by traverser to see if the current position is a returnable node.

- - ### Field Detail

    - #### ALL

          static final ReturnableEvaluator ALL

      Deprecated.
      A returnable evaluator that returns all nodes encountered.

    - #### ALL_BUT_START_NODE

          static final ReturnableEvaluator ALL_BUT_START_NODE

      Deprecated.
      A returnable evaluator that returns all nodes except the start node.

  - ### Method Detail

    - #### isReturnableNode

          boolean isReturnableNode(TraversalPosition currentPos)

      Deprecated.
      Method invoked by traverser to see if the current position is a returnable node.
      Parameters:
        `currentPos` - the traversal position
      Returns:
        True if current position is a returnable node

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