|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ter.util.Tree
Title: Tree
Description: A basic implementation of a biColored-tree of String
Copyright: Copyright (c) 2003
Company: UNICE
Constructor Summary | |
Tree()
Construct a new empty Tree. |
Method Summary | |
Tree |
getLeftChild()
This function return the leftChild. |
Tree |
getRightChild()
This function return the rightChild. |
java.lang.String |
getValue()
|
boolean |
is_empty()
the tree is empty if the left child, the right child and the value are null. |
boolean |
is_leaf()
the tree is a leaf if the left child, the right child are null but not the value. |
static java.lang.String |
leftCourse(Tree t)
This function do the navigation by the left on the tree t. |
void |
setLeftChild(Tree tree)
This procedure set the leftChild of the tree. |
void |
setRightChild(Tree tree)
This procedure set the rightChild of the tree. |
void |
setValue(java.lang.String value)
Set the root or leaf value for this tree. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Tree()
Method Detail |
public java.lang.String getValue() throws java.lang.Exception
java.lang.Exception
- if the tree is emptypublic void setValue(java.lang.String value)
value
- the string to set.public boolean is_empty()
public boolean is_leaf()
public Tree getLeftChild()
public Tree getRightChild()
public void setLeftChild(Tree tree)
tree
- the to get the leftChild
NB : the tree must not to be null.public void setRightChild(Tree tree)
tree
- the to get the rightChild
NB : the tree must not to be null.public static java.lang.String leftCourse(Tree t)
t
- the tree to course.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |