blob: a2a2a584ebb41cd0e76c2357c9bfad87170b9560 (
plain)
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
|
package org.archphantom.shenanigans.elements.values;
import java.math.BigDecimal;
import org.archphantom.shenanigans.elements.Program;
import org.archphantom.shenanigans.elements.variables.VarTable;
public class DecimalValue extends Value {
private BigDecimal val;
public DecimalValue (double val) {
this.val = new BigDecimal(val);
}
public DecimalValue (String val) {
this.val = new BigDecimal(val);
}
public DecimalValue (BigDecimal val) {
this.val = val;
}
public BigDecimal getValue (VarTable vars, Program program) {
return val;
}
}
|