| 程序包 | 说明 |
|---|---|
| cn.ponfee.disjob.common.tree |
| 限定符和类型 | 类和说明 |
|---|---|
class |
FlatNode<T extends Serializable & Comparable<T>,A>
节点扁平结构
|
class |
PlainNode<T extends Serializable & Comparable<T>,A>
Representing plain node
|
class |
TreeNode<T extends Serializable & Comparable<T>,A>
Tree node structure
┌───────────────────────────┐
│ 0 │
│ ┌─────┴─────┐ │
│ 1 2 │
│ ┌───┴───┐ ┌───┴───┐ │
│ 3 4 5 6 │
│ ┌─┴─┐ ┌─┘ │
│ 7 8 9 │
└───────────────────────────┘
上面这棵二叉树中的遍历方式:
DFS前序遍历:0137849256
DFS中序遍历:7381940526
DFS后序遍历:7839415620
BFS广度优先:0123456789
CFS孩子优先:0123478956 (备注:教科书上没有CFS一说,是我为方便说明描述而取名的)
|
| 限定符和类型 | 方法和说明 |
|---|---|
<E extends BaseNode<T,A>> |
TreeNode.mount(List<E> nodes) |
<E extends BaseNode<T,A>> |
TreeNode.mount(List<E> list,
boolean ignoreOrphan)
Mount a tree
|
| 限定符和类型 | 方法和说明 |
|---|---|
BaseNode<T,A> |
BaseNode.clone()
Deep copy
|
Copyright © 2024. All rights reserved.