@Immutable public interface Path extends Iterable<Path.Segment>
Path routeToStockholm = ..;
// Work with each segment of the path
for( Segment segment : routeToStockholm )
{
}
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Path.Segment
A segment combines a relationship in a path with a start and end node that describe the traversal direction
for that relationship.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Node node) |
boolean |
contains(Relationship relationship) |
Node |
end() |
int |
length() |
Iterable<Node> |
nodes()
Create an iterable over the nodes in this path, nodes will appear in the same order as they appear
in the path.
|
Iterable<Relationship> |
relationships()
Create an iterable over the relationships in this path.
|
Node |
start() |
Node start()
Node end()
int length()
boolean contains(Node node)
node - the node to check forboolean contains(Relationship relationship)
relationship - the relationship to check forIterable<Node> nodes()
Iterable of all nodes in this pathIterable<Relationship> relationships()
Iterable of all relationships in this pathCopyright © 2017. All rights reserved.