|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectfi.joensuu.cs.tra.BTree<E>
public class BTree<E>
BTree is a wrapper class for a root
BTreeNode.
BTreeNode| Constructor Summary | |
|---|---|
BTree()
Creates an empty BTree. |
|
BTree(BTreeNode<E> node)
Creates a BTree with the specified BTreeNode as the root node. |
|
| Method Summary | |
|---|---|
void |
destroyNode(BTreeNode<E> node)
Removes a single node. |
BTreeNode<E> |
getRoot()
Returns the root of this BTree. |
boolean |
isEmpty()
Returns true if this BTree is empty. |
BTreeNode<E> |
setRoot(BTreeNode<E> node)
Sets the root of this BTree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BTree()
public BTree(BTreeNode<E> node)
BTreeNode as the root node.
node - the root node for the BTree.| Method Detail |
|---|
public BTreeNode<E> setRoot(BTreeNode<E> node)
node - the new root BTreeNode.
BTreeNode.public BTreeNode<E> getRoot()
BTreeNode or
null if this BTree is empty.public boolean isEmpty()
BTreeNode
is null, false otherwise.public void destroyNode(BTreeNode<E> node)
node - the node to remove.
NullPointerException - if node is null.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||