|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Path
Represents a path in the graph. A path starts with a node followed by
pairs of Relationship
and Node
objects. The shortest path
is of length 0. Such a path contains only one node and no relationships.
During a traversal Path
instances are emitted where the current
position of the traverser is represented by each such path. The current
node in such a traversal is reached via endNode()
.
Method Summary | |
---|---|
Node |
endNode()
Returns the end node of this path. |
Iterator<PropertyContainer> |
iterator()
Iterates through both the Node s and Relationship s of this
path in order. |
Relationship |
lastRelationship()
Returns the last Relationship in this path. |
int |
length()
Returns the length of this path. |
Iterable<Node> |
nodes()
Returns all the nodes in this path. |
Iterable<Relationship> |
relationships()
Returns all the relationships in between the nodes which this path consists of. |
Node |
startNode()
Returns the start node of this path. |
String |
toString()
Returns a natural string representation of this path. |
Method Detail |
---|
Node startNode()
nodes()
iterable.
Node endNode()
nodes()
iterable. If the length()
of this path
is 0 the end node returned by this method is the same as the start node.
If a path is emitted from a traverser the end node is the current node
where the traverser is at the moment.
Relationship lastRelationship()
Relationship
in this path.
Relationship
in this path, or null
if this path contains no Relationship
s.Iterable<Relationship> relationships()
Iterable<Node> nodes()
startNode()
and the last node is the same as endNode()
.
In between those nodes there can be an arbitrary number of nodes. The
shortest path possible is just one node, where also the the start node is
the same as the end node.
int length()
String toString()
toString
in class Object
Iterator<PropertyContainer> iterator()
Node
s and Relationship
s of this
path in order. Interleaving Node
s with Relationship
s,
starting and ending with a Node
(the startNode()
and
endNode()
respectively).
iterator
in interface Iterable<PropertyContainer>
Iterable.iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |