|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface BinaryTree<T extends Comparable<T>>
Created by IntelliJ IDEA.
User: luoguo
Date: 11-3-31 Time: 上午11:10
To change this template use File | Settings | File Templates.
| 字段摘要 | |
|---|---|
static int |
DLR_ORDER
|
static int |
LDR_ORDER
|
static int |
LRD_ORDER
|
| 方法摘要 | |
|---|---|
BinaryTree<T> |
add(T t)
增加一个节点 |
void |
foreach(Processor<T> process)
对每个节点执行操作 |
void |
foreach(Processor<T> process,
int mode)
用指定的遍历方式对每一个节点执行操作 |
T |
getData()
返回当前节点数据 |
BinaryTreeImpl<T> |
getParent()
|
int |
height()
获取树的高度 |
void |
remove(T t)
删除指定结点子树 |
BinaryTree<T> |
search(T find)
|
int |
size()
求树的节点数 |
AVLTree<T> |
toAVLTree()
转换为平衡二叉树 |
| 字段详细信息 |
|---|
static final int DLR_ORDER
static final int LDR_ORDER
static final int LRD_ORDER
| 方法详细信息 |
|---|
BinaryTree<T> search(T find)
BinaryTree<T> add(T t)
t - T getData()
void remove(T t)
t - void foreach(Processor<T> process)
process -
void foreach(Processor<T> process,
int mode)
process - mode - 前序、后序、中序BinaryTreeImpl<T> getParent()
int size()
int height()
AVLTree<T> toAVLTree()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||