org.neo4j.graphdb.traversal

Interface TraversalBranch

    • Method Detail

      • next

        TraversalBranch next(PathExpander expander,
                             TraversalContext metadata)
        Returns the next expansion source from the expanded relationships from the current node.
        Parameters:
        expander - an expander to decide which relationships to follow
        metadata - the context of the traversal
        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.
      • continues

        boolean continues()
        Returns:
        whether or not the traversal should continue further along this branch.
      • evaluation

        void evaluation(Evaluation eval)
        Can change evaluation outcome in a negative direction. For example to force pruning.
        Parameters:
        eval - the Evaluation to AND with the current evaluation.
      • state

        Object state()
        Returns the state associated with this branch. Why is this of type Object? The state object type only exists when specifying the expander in the TraversalDescription, not anywhere else. So in the internals of the traversal the state type is unknown and ignored.
        Returns:
        the state associated with this branch.

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