diff options
author | 2020-04-26 18:23:13 -0400 | |
---|---|---|
committer | 2020-04-26 18:23:13 -0400 | |
commit | c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e (patch) | |
tree | 0c2e212e4e95c1d2311629128641d5cd561210f3 /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java | |
parent | Merge branch 'Attribute-Solver' (diff) | |
download | VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.gz VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.zst VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.zip |
Add PLEDGE case study files
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java | 278 |
1 files changed, 278 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java new file mode 100644 index 00000000..2ca64b95 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/Town.java | |||
@@ -0,0 +1,278 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package Taxation; | ||
4 | |||
5 | import java.util.Arrays; | ||
6 | import java.util.Collections; | ||
7 | import java.util.List; | ||
8 | |||
9 | import org.eclipse.emf.common.util.Enumerator; | ||
10 | |||
11 | /** | ||
12 | * <!-- begin-user-doc --> | ||
13 | * A representation of the literals of the enumeration '<em><b>Town</b></em>', | ||
14 | * and utility methods for working with them. | ||
15 | * <!-- end-user-doc --> | ||
16 | * @see Taxation.TaxationPackage#getTown() | ||
17 | * @model | ||
18 | * @generated | ||
19 | */ | ||
20 | public enum Town implements Enumerator { | ||
21 | /** | ||
22 | * The '<em><b>LL</b></em>' literal object. | ||
23 | * <!-- begin-user-doc --> | ||
24 | * <!-- end-user-doc --> | ||
25 | * @see #LL_VALUE | ||
26 | * @generated | ||
27 | * @ordered | ||
28 | */ | ||
29 | LL(0, "LL", "LL"), | ||
30 | |||
31 | /** | ||
32 | * The '<em><b>BB</b></em>' literal object. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #BB_VALUE | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | BB(1, "BB", "BB"), | ||
40 | |||
41 | /** | ||
42 | * The '<em><b>SS</b></em>' literal object. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #SS_VALUE | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | SS(2, "SS", "SS"), | ||
50 | |||
51 | /** | ||
52 | * The '<em><b>TT</b></em>' literal object. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #TT_VALUE | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | TT(3, "TT", "TT"), | ||
60 | |||
61 | /** | ||
62 | * The '<em><b>Other</b></em>' literal object. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #OTHER_VALUE | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | OTHER(4, "Other", "Other"); | ||
70 | |||
71 | /** | ||
72 | * The '<em><b>LL</b></em>' literal value. | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @see #LL | ||
76 | * @model | ||
77 | * @generated | ||
78 | * @ordered | ||
79 | */ | ||
80 | public static final int LL_VALUE = 0; | ||
81 | |||
82 | /** | ||
83 | * The '<em><b>BB</b></em>' literal value. | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @see #BB | ||
87 | * @model | ||
88 | * @generated | ||
89 | * @ordered | ||
90 | */ | ||
91 | public static final int BB_VALUE = 1; | ||
92 | |||
93 | /** | ||
94 | * The '<em><b>SS</b></em>' literal value. | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @see #SS | ||
98 | * @model | ||
99 | * @generated | ||
100 | * @ordered | ||
101 | */ | ||
102 | public static final int SS_VALUE = 2; | ||
103 | |||
104 | /** | ||
105 | * The '<em><b>TT</b></em>' literal value. | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @see #TT | ||
109 | * @model | ||
110 | * @generated | ||
111 | * @ordered | ||
112 | */ | ||
113 | public static final int TT_VALUE = 3; | ||
114 | |||
115 | /** | ||
116 | * The '<em><b>Other</b></em>' literal value. | ||
117 | * <!-- begin-user-doc --> | ||
118 | * <!-- end-user-doc --> | ||
119 | * @see #OTHER | ||
120 | * @model name="Other" | ||
121 | * @generated | ||
122 | * @ordered | ||
123 | */ | ||
124 | public static final int OTHER_VALUE = 4; | ||
125 | |||
126 | /** | ||
127 | * An array of all the '<em><b>Town</b></em>' enumerators. | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | private static final Town[] VALUES_ARRAY = | ||
133 | new Town[] { | ||
134 | LL, | ||
135 | BB, | ||
136 | SS, | ||
137 | TT, | ||
138 | OTHER, | ||
139 | }; | ||
140 | |||
141 | /** | ||
142 | * A public read-only list of all the '<em><b>Town</b></em>' enumerators. | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | public static final List<Town> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | ||
148 | |||
149 | /** | ||
150 | * Returns the '<em><b>Town</b></em>' literal with the specified literal value. | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @param literal the literal. | ||
154 | * @return the matching enumerator or <code>null</code>. | ||
155 | * @generated | ||
156 | */ | ||
157 | public static Town get(String literal) { | ||
158 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { | ||
159 | Town result = VALUES_ARRAY[i]; | ||
160 | if (result.toString().equals(literal)) { | ||
161 | return result; | ||
162 | } | ||
163 | } | ||
164 | return null; | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * Returns the '<em><b>Town</b></em>' literal with the specified name. | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @param name the name. | ||
172 | * @return the matching enumerator or <code>null</code>. | ||
173 | * @generated | ||
174 | */ | ||
175 | public static Town getByName(String name) { | ||
176 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { | ||
177 | Town result = VALUES_ARRAY[i]; | ||
178 | if (result.getName().equals(name)) { | ||
179 | return result; | ||
180 | } | ||
181 | } | ||
182 | return null; | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * Returns the '<em><b>Town</b></em>' literal with the specified integer value. | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @param value the integer value. | ||
190 | * @return the matching enumerator or <code>null</code>. | ||
191 | * @generated | ||
192 | */ | ||
193 | public static Town get(int value) { | ||
194 | switch (value) { | ||
195 | case LL_VALUE: return LL; | ||
196 | case BB_VALUE: return BB; | ||
197 | case SS_VALUE: return SS; | ||
198 | case TT_VALUE: return TT; | ||
199 | case OTHER_VALUE: return OTHER; | ||
200 | } | ||
201 | return null; | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * <!-- begin-user-doc --> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @generated | ||
208 | */ | ||
209 | private final int value; | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | private final String name; | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | private final String literal; | ||
224 | |||
225 | /** | ||
226 | * Only this class can construct instances. | ||
227 | * <!-- begin-user-doc --> | ||
228 | * <!-- end-user-doc --> | ||
229 | * @generated | ||
230 | */ | ||
231 | private Town(int value, String name, String literal) { | ||
232 | this.value = value; | ||
233 | this.name = name; | ||
234 | this.literal = literal; | ||
235 | } | ||
236 | |||
237 | /** | ||
238 | * <!-- begin-user-doc --> | ||
239 | * <!-- end-user-doc --> | ||
240 | * @generated | ||
241 | */ | ||
242 | @Override | ||
243 | public int getValue() { | ||
244 | return value; | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * <!-- begin-user-doc --> | ||
249 | * <!-- end-user-doc --> | ||
250 | * @generated | ||
251 | */ | ||
252 | @Override | ||
253 | public String getName() { | ||
254 | return name; | ||
255 | } | ||
256 | |||
257 | /** | ||
258 | * <!-- begin-user-doc --> | ||
259 | * <!-- end-user-doc --> | ||
260 | * @generated | ||
261 | */ | ||
262 | @Override | ||
263 | public String getLiteral() { | ||
264 | return literal; | ||
265 | } | ||
266 | |||
267 | /** | ||
268 | * Returns the literal value of the enumerator, which is its string representation. | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public String toString() { | ||
275 | return literal; | ||
276 | } | ||
277 | |||
278 | } //Town | ||