blob: e0c303928d65c01b05472a53157ee14e036b9445 (
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
27
|
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 static final long serialVersionUID = -5727395708519872329L;
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;
}
}
|