|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--jds.collection.BinarySearchTree
BinarySearchTree - set kept in a binary search tree; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Collection, Serialized Form| Constructor Summary | |
BinarySearchTree(java.util.Comparator t)
initialize a newly created binary search tree |
|
| Method Summary | |
void |
addElement(java.lang.Object val)
add a new value to the collection |
boolean |
containsElement(java.lang.Object val)
see if collection contains value |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
findElement(java.lang.Object val)
find element that will test equal to value |
java.lang.Object |
getFirst()
|
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeElement(java.lang.Object val)
remove a new value from the collection |
void |
removeFirst()
|
int |
size()
Determines number of elements in collection |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public BinarySearchTree(java.util.Comparator t)
t - comparator object used to place elements in sequence| Method Detail |
public boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration that will yield the elements of the collectionEnumerationpublic boolean containsElement(java.lang.Object val)
val - element to be testedpublic java.lang.Object findElement(java.lang.Object val)
value - element to be testedequals to argumentpublic void addElement(java.lang.Object val)
value - element to be inserted into collectionpublic void removeElement(java.lang.Object val)
value - element to be removed from collectionpublic java.lang.Object getFirst()
public void removeFirst()
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||