📄 htnode.java
字号:
package datastructure;
class HTNode {
private int weight;
private HTNode leftNode;
private HTNode rightNode;
private HTNode parentNode;
int parent;
int lchild;
int rchild;
private boolean highlight;
boolean flag;
int x;
int y;
//number用于存放节点的编码
String number;
String c;
public HTNode(int i) {
highlight = false;
weight = i;
number = "";
c = "";
flag = false;
parentNode = leftNode = rightNode = null;
parent = lchild = rchild = 0;
}
public void setWeight(int i) {
weight = i;
}
public int getWeight() {
return weight;
}
public void setLeftNode(HTNode node) {
leftNode = node;
}
public void setRightNode(HTNode node) {
rightNode = node;
}
public HTNode getLeftNode() {
return leftNode;
}
public HTNode getRightNode() {
return rightNode;
}
public void setParentNode(HTNode node) {
parentNode = node;
}
public HTNode getParentNode() {
return parentNode;
}
public void setHighlight(boolean flag3) {
highlight = flag3;
}
public boolean getHighlight() {
return highlight;
}
public boolean isLeaf() {
return rightNode == null && leftNode == null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -