-
Notifications
You must be signed in to change notification settings - Fork 0
/
Data.java
66 lines (54 loc) · 1.72 KB
/
Data.java
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import java.util.HashMap;
public class Data implements java.io.Serializable {
transient private HashMap<String, ValueBase> variables = SyntaxTree.getVariables();
transient private HashMap<String, ProgramBase> functions = SyntaxTree.getFunctions();
transient private boolean isBreaked = false;
transient private boolean isContinued = false;
transient private ValueBase returnedData = null;
private String instanceName;
public String getInstanceName() {
return instanceName;
}
public Data setInstanceName(String instanceName) {
this.instanceName = instanceName;
return this;
}
public ValueBase getReturnedData() {
return returnedData;
}
public void setReturnedData(ValueBase returnedData) {
this.returnedData = returnedData;
}
public boolean isBroken() {
return isBreaked;
}
public void setBroken(boolean broken) {
isBreaked = broken;
}
public Data setVariables(HashMap<String, ValueBase> variables) {
this.variables = variables;
return this;
}
public Data setFunctions(HashMap<String, ProgramBase> functions) {
this.functions = functions;
return this;
}
public HashMap<String, ValueBase> getVariables() {
if (variables == null) {
variables = SyntaxTree.getVariables();
}
return variables;
}
public HashMap<String, ProgramBase> getFunctions() {
if (functions == null) {
functions = SyntaxTree.getFunctions();
}
return functions;
}
public boolean isContinued() {
return isContinued;
}
public void setContinued(boolean continued) {
isContinued = continued;
}
}