24 lines
551 B
Java
24 lines
551 B
Java
package fr.iutfbleau.sae.mpif;
|
|
|
|
public class DecodeNode {
|
|
public DecodeNode left;
|
|
public DecodeNode right;
|
|
public Integer value; // null si pas une feuille
|
|
|
|
public DecodeNode() {
|
|
this.left = null;
|
|
this.right = null;
|
|
this.value = null;
|
|
}
|
|
|
|
public DecodeNode(DecodeNode left, DecodeNode right, Integer value) {
|
|
this.left = left;
|
|
this.right = right;
|
|
this.value = value;
|
|
}
|
|
|
|
public boolean isLeaf() {
|
|
return this.left == null && this.right == null;
|
|
}
|
|
}
|