Constructor and Description |
---|
BTree()
Creates an empty BTree.
|
BTree(BTreeNode<E> node)
Creates a BTree with the specified
BTreeNode as the root node. |
Modifier and Type | Method and Description |
---|---|
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.
|
public BTreeNode<E> getRoot()
BTreeNode
or
null if this BTree is empty.public boolean isEmpty()
BTreeNode
is null, false otherwise.