1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-28 09:35:19 +00:00

Change the constructor for NumberNode

This commit is contained in:
2017-07-28 14:47:34 -07:00
parent f303093a3f
commit 556a72f946
2 changed files with 6 additions and 13 deletions

View File

@@ -22,19 +22,10 @@ public class NumberNode extends TreeNode {
/**
* Creates a new number node with the given double value.
* @param value the value to use.
* @param newNumber the number for which to create a number node.
*/
public NumberNode(double value){
number = new NaiveNumber(value);
}
/**
* Creates a new number node with the given string value, converted
* to a double.
* @param value the value.
*/
public NumberNode(String value){
this(Double.parseDouble(value));
public NumberNode(NumberInterface newNumber){
this.number = newNumber;
}
/**