blob: ecbcf1bef356a729c7dda592375c80dcc40400ec (
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 java.math.BigInteger;
import org.archphantom.shenanigans.elements.Program;
import org.archphantom.shenanigans.elements.variables.VarTable;
public class IntValue extends DecimalValue {
private static final long serialVersionUID = 755770306873491835L;
public IntValue (int val) {
super(new BigDecimal(val));
}
public IntValue (String val) {
super(new BigDecimal(val));
}
public IntValue(BigInteger val) {
super(new BigDecimal(val));
}
public BigInteger intValue (VarTable vars, Program program) {
return super.getValue(vars, program).toBigInteger();
}
}
|