-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValue.java
More file actions
74 lines (61 loc) · 1.36 KB
/
Value.java
File metadata and controls
74 lines (61 loc) · 1.36 KB
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
67
68
69
70
71
72
73
74
import java.util.*;
import java.lang.*;
public class Value {
// if name is null then this object is a constant value
// if name != null but type is empty or null this object is a function header
// if name != null and type > 1 this object is a record
private String name;
private String type;
private Object content;
private String returnType;
private Object paramType;
//Constant
public Value(Object content) {
this.content = content;
}
//Record
public Value(String name, String type) {
this.name = name;
this.type = type;
}
//Regular single value
public Value(String name, String type, Object content) {
this.name = name;
this.type = type;
this.content = content;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public Object getContent() {
return this.content;
}
public void setContent(Object content) {
this.content = content;
}
public String getType() {
return this.type;
}
public String getRetType() {
return this.returnType;
}
public void setType(String type) {
this.type = type;
}
public Object getParams() {
return this.paramType;
}
public void setParams(Object params) {
this.paramType = params;
}
public void setReturn(String returnType) {
this.returnType = returnType;
}
@Override
public String toString() {
return name;
}
}