public class VtreePath
extends java.lang.Object
VtreePath, i.e., a Vtree path,
is a sequence of vtrees such that each vtree
is a child of the previous vtree.
It is possible to navigate between vtrees
from the ''root'' (the ancestor of the vtrees) down to the leaf of the path,
and from the leaf up to the root.| Constructor and Description |
|---|
VtreePath(Vtree r,
Vtree l)
Creates a vtree path whose root is the first specified vtree
and whose leaf is the second specified vtree.
|
| Modifier and Type | Method and Description |
|---|---|
void |
down()
Changes the current position one step towards the leaf.
|
Vtree |
get()
Returns the current position of this path.
|
void |
gotoLeaf()
Changes the current position to the leaf of this path.
|
void |
gotoRoot()
Changes the current position to the root of this path.
|
boolean |
isAtLeaf()
Indicates whether the current position is the leaf.
|
boolean |
isAtRoot()
Indicates whether the current position is the root.
|
boolean |
isDownLeft()
Indicates whether the next step is on the left or on the right.
|
java.lang.String |
toString() |
void |
up()
Changes the current position one step towards the root.
|
public void gotoRoot()
public void gotoLeaf()
public void up()
public void down()
public boolean isAtRoot()
true if this vtree path
is currently positioned on the root.public boolean isAtLeaf()
true if this vtree path
is currently positioned on the leaf.public Vtree get()
public boolean isDownLeft()
public java.lang.String toString()
toString in class java.lang.Object