1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-11-18 08:29:33 -08:00
Abacus/src/org/nwapw/abacus/tree/NumberNode.java

26 lines
503 B
Java
Raw Normal View History

package org.nwapw.abacus.tree;
import org.nwapw.abacus.number.NaiveNumber;
import org.nwapw.abacus.number.NumberInterface;
public class NumberNode extends TreeNode {
private NumberInterface number;
public NumberNode(){
number = null;
}
public NumberNode(double value){
number = new NaiveNumber(value);
}
public NumberNode(String value){
this(Double.parseDouble(value));
}
public NumberInterface getNumber() {
return number;
}
}