|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.viewer.RedBlackTree
An immutable red-black tree that can draw itself. A red-black tree is a binary search tree with the following properties:
Constructor Summary | |
RedBlackTree()
Constructs an empty RedBlackTree. |
Method Summary | |
Object |
clone()
Because this structure is immutable, this method simply returns this tree. |
JComponent |
getDrawing()
Returns a drawing of this tree. |
JComponent |
getDrawing(Font fnt)
Returns a drawing of this tree using the given Font. |
BSTInterface |
put(String key)
Returns the RedBlackTree resulting from the insertion of key into this RedBlackTree. |
BSTInterface |
remove(String key)
Returns the RedBlackTree resulting from the removal of key from this RedBlackTree. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RedBlackTree()
Method Detail |
public BSTInterface put(String key) throws NullPointerException
put
in interface BSTInterface
NullPointerException
- If key is nullpublic BSTInterface remove(String key) throws NullPointerException
remove
in interface BSTInterface
NullPointerException
- If key is nullpublic JComponent getDrawing()
getDrawing
in interface BSTInterface
public JComponent getDrawing(Font fnt)
getDrawing
in interface BSTInterface
NullPointerException
- if fnt is null.public Object clone()
clone
in interface BSTInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |