|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by each of the data structures whose functionality is equivalent to a binary search tree. Functionality includes the ability to insert and delete String keys, to clone itself, and to draw itself.
Note that this interface does not extend java.lang.Cloneable
.
This is because implementations may not need to use the
clone
method of Object
in order to clone themselves.
AVLTree
,
BinarySearchTree
,
SplayTree
,
Cloneable
,
Object
Method Summary | |
Object |
clone()
Returns a clone of this tree. |
JComponent |
getDrawing()
Returns a drawing of the tree. |
JComponent |
getDrawing(Font fnt)
Returns a drawing of the tree using the given Font. |
BSTInterface |
put(String key)
Returns the result of inserting key into this tree. |
BSTInterface |
remove(String key)
Returns the result of removing key from this. |
Method Detail |
public BSTInterface put(String key) throws NullPointerException
NullPointerException
- If key is nullpublic BSTInterface remove(String key) throws NullPointerException
NullPointerException
- If key is nullpublic JComponent getDrawing()
public JComponent getDrawing(Font fnt)
NullPointerException
- if fnt is null.public Object clone()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |