This repository has been archived by the owner on Nov 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathValue.java
92 lines (83 loc) · 1.55 KB
/
Value.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* Abstract class for a specific primitive value. There are four possible
* values: Integer, Real, Boolean and String.
*/
public abstract class Value {
/**
* Get Type object.
*
* @return Type.
*/
public Type type() {
assert false;
return null;
}
/**
* Set the Integer value.
*
* @param val value to be set.
*/
public void setIntValue(int val) {
assert false;
}
/**
* Set the Real value.
*
* @param val value to be set.
*/
public void setRealValue(double val) {
assert false;
}
/**
* Set the Boolean Value
*
* @param val value to be set.
*/
public void setBoolValue(boolean val) {
assert false;
}
/**
* Set the String value.
*
* @param val value to be set.
*/
public void setStringValue(String val) {
assert false;
}
/**
* Get the Integer value.
*
* @return integer value.
*/
public int intValue() {
assert false;
return 0;
}
/**
* Get the Real value.
*
* @return real value.
*/
public double realValue() {
assert false;
return 0;
}
/**
* Get the Boolean value.
*
* @return boolean value.
*/
public boolean boolValue() {
assert false;
return false;
}
/**
* Get the String value.
*
* @return string value.
*/
public String stringValue() {
assert false;
return "";
}
}