blob: c8d9a64bebcf6742e0669a11cbe92e28212d970c (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package bjc.dicelang.ast;
/**
* Represents a integer-valued result
*
* @author ben
*
*/
public class IntegerResult implements IResult {
private int value;
/**
* Create a new integer valued result
*
* @param val
* The value of the result
*/
public IntegerResult(int val) {
value = val;
}
/**
* Get the value of this result
*
* @return The value of this result
*/
public int getValue() {
return value;
}
@Override
public ResultType getType() {
return ResultType.INTEGER;
}
@Override
public String toString() {
return Integer.toString(value);
}
}
|