-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHuffmanNode.java
More file actions
56 lines (45 loc) · 1.12 KB
/
HuffmanNode.java
File metadata and controls
56 lines (45 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package sample;
public class HuffmanNode {
HuffmanNode(String tag,int probability,String code){
this.tag = tag;
this.code = code;
this.probability = probability;
this.left=null;
this.right=null;
}
private String tag;
private int probability;
private String code;
private HuffmanNode right;
private HuffmanNode left;
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public int getProbability() {
return probability;
}
public void setProbability(int probability) {
this.probability = probability;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public HuffmanNode getRight() {
return right;
}
public void setRight(HuffmanNode right) {
this.right = right;
}
public HuffmanNode getLeft() {
return left;
}
public void setLeft(HuffmanNode left) {
this.left = left;
}
}