public interface DependencyPath extends Iterable<DependencyRelation>
Modifier and Type | Method and Description |
---|---|
DependencyTreeNode |
first()
Returns the first node in the path, which is closest to the root.
|
DependencyRelation |
firstRelation()
Returns the relation that connects the first and second nodes in the
path, which are closest to the root.
|
DependencyTreeNode |
getNode(int position)
Returns the node location at the specified position along the path.
|
String |
getRelation(int position)
Returns the relation connecting the node at the specified position to the
next node.
|
Iterator<DependencyRelation> |
iterator()
Returns an iterator over all the relations in the path in order from
closest to the root to furthest.
|
DependencyTreeNode |
last()
Returns the last node in the path, which is furthest from the root.
|
DependencyRelation |
lastRelation()
Returns the relation that connects the last and second to last nodes in
the path, which are furthest from the root.
|
int |
length()
Returns the number of nodes in the dependency path.
|
DependencyTreeNode first()
DependencyRelation firstRelation()
DependencyTreeNode getNode(int position)
String getRelation(int position)
length() - 1
relations in the path.IllegalArgumentException
- if position
is less than 0 or
position
is greater than length() - 1
.Iterator<DependencyRelation> iterator()
iterator
in interface Iterable<DependencyRelation>
DependencyTreeNode last()
DependencyRelation lastRelation()
int length()
length() - 1
.Copyright © 2012. All Rights Reserved.