Package org.neo4j.graphdb.traversal
Interface Traverser
This interface represents the traverser which is used to step through the
results of a traversal. Each step can be represented in different ways. The
default is as
Path
objects which all other representations can be
derived from, i.e Node
or Relationship
. Each step
can also be represented in one of those representations directly.-
Method Details
-
nodes
Represents the traversal in the form ofNode
s. This is a convenient way to iterate overPath
s and get thePath.endNode()
for each position.- Returns:
- the traversal in the form of
Node
objects.
-
relationships
Iterable<Relationship> relationships()Represents the traversal in the form ofRelationship
s. This is a convenient way to iterate overPath
s and get thePath.lastRelationship()
for each position.- Returns:
- the traversal in the form of
Relationship
objects.
-
iterator
Represents the traversal in the form ofPath
s. When a traversal is done and haven't been fully iterated through, it should beclosed
.- Returns:
- the traversal in the form of
Path
objects.
-
metadata
TraversalMetadata metadata()- Returns:
- the
TraversalMetadata
from the last traversal performed, or being performed by this traverser.
-