blob: b0c1400b9012e23c5279ab5d43aa2ad10194b96b (
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
41
42
43
44
45
46
47
48
|
package bjc.utils.dice.ast;
/**
* A AST node that represents a literal value
*
* @author ben
*
*/
public class LiteralDiceNode implements IDiceASTNode {
/**
* The value contained by this node
*/
private String data;
/**
* Create a new node with the given value
*
* @param data
* The value to be in this node
*/
public LiteralDiceNode(String data) {
this.data = data;
}
@Override
public boolean isOperator() {
return false;
}
/**
* Get the data stored in this AST node
*
* @return the data stored in this AST node
*/
public String getData() {
return data;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return data;
}
}
|