1 |
|
package org.qedeq.kernel.se.visitor; |
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
@link |
6 |
|
|
7 |
|
@author |
8 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (116) |
Complexity: 36 |
Complexity Density: 0.47 |
|
9 |
|
public class QedeqNumbers { |
10 |
|
|
11 |
|
|
12 |
|
private int imports; |
13 |
|
|
14 |
|
|
15 |
|
private int chapters; |
16 |
|
|
17 |
|
|
18 |
|
private int sections; |
19 |
|
|
20 |
|
|
21 |
|
private int subsectionsAndNodes; |
22 |
|
|
23 |
|
|
24 |
|
private int importNumber; |
25 |
|
|
26 |
|
|
27 |
|
private boolean chapterNumbering; |
28 |
|
|
29 |
|
|
30 |
|
private int chapterNumber; |
31 |
|
|
32 |
|
|
33 |
|
private int absoluteChapterNumber; |
34 |
|
|
35 |
|
|
36 |
|
private boolean sectionNumbering; |
37 |
|
|
38 |
|
|
39 |
|
private int sectionNumber; |
40 |
|
|
41 |
|
|
42 |
|
private int absoluteSectionNumber; |
43 |
|
|
44 |
|
|
45 |
|
private int subsectionNumber; |
46 |
|
|
47 |
|
|
48 |
|
private int nodeNumber; |
49 |
|
|
50 |
|
|
51 |
|
private int axiomNumber; |
52 |
|
|
53 |
|
|
54 |
|
private int functionDefinitionNumber; |
55 |
|
|
56 |
|
|
57 |
|
private int predicateDefinitionNumber; |
58 |
|
|
59 |
|
|
60 |
|
private int propositionNumber; |
61 |
|
|
62 |
|
|
63 |
|
private int ruleNumber; |
64 |
|
|
65 |
|
|
66 |
|
private boolean finished; |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
@param |
72 |
|
@param |
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
74 |
171
|
public QedeqNumbers(final int imports, final int chapters) {... |
75 |
171
|
this.imports = imports; |
76 |
171
|
this.chapters = chapters; |
77 |
|
} |
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
@param |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (19) |
Complexity: 1 |
Complexity Density: 0.05 |
|
84 |
52088
|
public QedeqNumbers(final QedeqNumbers original) {... |
85 |
52088
|
imports = original.imports; |
86 |
52088
|
chapters = original.chapters; |
87 |
52088
|
sections = original.sections; |
88 |
52088
|
subsectionsAndNodes = original.subsectionsAndNodes; |
89 |
52088
|
importNumber = original.importNumber; |
90 |
52088
|
chapterNumbering = original.chapterNumbering; |
91 |
52088
|
chapterNumber = original.chapterNumber; |
92 |
52088
|
absoluteChapterNumber = original.absoluteChapterNumber; |
93 |
52088
|
sectionNumbering = original.sectionNumbering; |
94 |
52088
|
nodeNumber = original.nodeNumber; |
95 |
52088
|
sectionNumber = original.sectionNumber; |
96 |
52088
|
absoluteSectionNumber = original.absoluteSectionNumber; |
97 |
52088
|
subsectionNumber = original.subsectionNumber; |
98 |
52088
|
axiomNumber = original.axiomNumber; |
99 |
52088
|
functionDefinitionNumber = original.functionDefinitionNumber; |
100 |
52088
|
predicateDefinitionNumber = original.predicateDefinitionNumber; |
101 |
52088
|
propositionNumber = original.propositionNumber; |
102 |
52088
|
ruleNumber = original.ruleNumber; |
103 |
52088
|
finished = original.finished; |
104 |
|
} |
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
@return |
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
44
|
public int getImportNumber() {... |
112 |
44
|
return importNumber; |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
67
|
public void increaseImportNumber() {... |
119 |
67
|
importNumber++; |
120 |
|
} |
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
@return |
126 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
127 |
253
|
public int getChapterNumber() {... |
128 |
253
|
return chapterNumber; |
129 |
|
} |
130 |
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
@param |
135 |
|
@param |
136 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 2 |
Complexity Density: 0.18 |
|
137 |
192
|
public void increaseChapterNumber(final int sections, final boolean chapterNumbering) {... |
138 |
192
|
this.chapterNumbering = chapterNumbering; |
139 |
192
|
absoluteChapterNumber++; |
140 |
192
|
if (chapterNumbering) { |
141 |
167
|
chapterNumber++; |
142 |
|
} |
143 |
192
|
this.sections = sections; |
144 |
192
|
this.subsectionsAndNodes = 0; |
145 |
192
|
this.sectionNumber = 0; |
146 |
192
|
this.absoluteSectionNumber = 0; |
147 |
192
|
this.sectionNumbering = true; |
148 |
192
|
this.subsectionNumber = 0; |
149 |
192
|
this.nodeNumber = 0; |
150 |
|
} |
151 |
|
|
152 |
|
|
153 |
|
|
154 |
|
|
155 |
|
@return |
156 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
157 |
314
|
public boolean isChapterNumbering() {... |
158 |
314
|
return chapterNumbering; |
159 |
|
} |
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
@return |
165 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
166 |
129
|
public int getAbsoluteChapterNumber() {... |
167 |
129
|
return absoluteChapterNumber; |
168 |
|
} |
169 |
|
|
170 |
|
|
171 |
|
|
172 |
|
|
173 |
|
@return |
174 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
175 |
127
|
public int getSectionNumber() {... |
176 |
127
|
return sectionNumber; |
177 |
|
} |
178 |
|
|
179 |
|
|
180 |
|
|
181 |
|
|
182 |
|
@param |
183 |
|
@param |
184 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
185 |
1044
|
public void increaseSectionNumber(final int subsectionsAndNodes,... |
186 |
|
final boolean sectionNumbering) { |
187 |
1044
|
this.subsectionsAndNodes = subsectionsAndNodes; |
188 |
1044
|
this.sectionNumbering = sectionNumbering; |
189 |
1044
|
absoluteSectionNumber++; |
190 |
1044
|
if (sectionNumbering) { |
191 |
599
|
sectionNumber++; |
192 |
|
} |
193 |
1044
|
subsectionNumber = 0; |
194 |
1044
|
nodeNumber = 0; |
195 |
|
} |
196 |
|
|
197 |
|
|
198 |
|
|
199 |
|
|
200 |
|
@return |
201 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
202 |
1847
|
public int getAbsoluteSectionNumber() {... |
203 |
1847
|
return absoluteSectionNumber; |
204 |
|
} |
205 |
|
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
|
@return |
210 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
211 |
1047
|
public boolean isSectionNumbering() {... |
212 |
1047
|
return sectionNumbering; |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
@return |
219 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
220 |
13639
|
public int getSubsectionNumber() {... |
221 |
13639
|
return subsectionNumber; |
222 |
|
} |
223 |
|
|
224 |
|
|
225 |
|
|
226 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
227 |
2257
|
public void increaseSubsectionNumber() {... |
228 |
2257
|
subsectionNumber++; |
229 |
|
} |
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
|
234 |
|
@return |
235 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
236 |
13632
|
public int getNodeNumber() {... |
237 |
13632
|
return nodeNumber; |
238 |
|
} |
239 |
|
|
240 |
|
|
241 |
|
|
242 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
243 |
11489
|
public void increaseNodeNumber() {... |
244 |
11489
|
nodeNumber++; |
245 |
|
} |
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
|
@return |
251 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
252 |
9
|
public int getAxiomNumber() {... |
253 |
9
|
return axiomNumber; |
254 |
|
} |
255 |
|
|
256 |
|
|
257 |
|
|
258 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
259 |
2312
|
public void increaseAxiomNumber() {... |
260 |
2312
|
axiomNumber++; |
261 |
|
} |
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
|
@return |
267 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
268 |
36
|
public int getFunctionDefinitionNumber() {... |
269 |
36
|
return functionDefinitionNumber; |
270 |
|
} |
271 |
|
|
272 |
|
|
273 |
|
|
274 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
275 |
2296
|
public void increaseFunctionDefinitionNumber() {... |
276 |
2296
|
functionDefinitionNumber++; |
277 |
|
} |
278 |
|
|
279 |
|
|
280 |
|
|
281 |
|
|
282 |
|
@return |
283 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
284 |
14
|
public int getPredicateDefinitionNumber() {... |
285 |
14
|
return predicateDefinitionNumber; |
286 |
|
} |
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
291 |
2292
|
public void increasePredicateDefinitionNumber() {... |
292 |
2292
|
predicateDefinitionNumber++; |
293 |
|
} |
294 |
|
|
295 |
|
|
296 |
|
|
297 |
|
|
298 |
|
@return |
299 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
300 |
61
|
public int getPropositionNumber() {... |
301 |
61
|
return propositionNumber; |
302 |
|
} |
303 |
|
|
304 |
|
|
305 |
|
|
306 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
307 |
2294
|
public void increasePropositionNumber() {... |
308 |
2294
|
propositionNumber++; |
309 |
|
} |
310 |
|
|
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
@return |
315 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
316 |
18
|
public int getRuleNumber() {... |
317 |
18
|
return ruleNumber; |
318 |
|
} |
319 |
|
|
320 |
|
|
321 |
|
|
322 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
323 |
2298
|
public void increaseRuleNumber() {... |
324 |
2298
|
ruleNumber++; |
325 |
|
} |
326 |
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
@return |
331 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
332 |
26050
|
public boolean isFinished() {... |
333 |
26050
|
return finished; |
334 |
|
} |
335 |
|
|
336 |
|
|
337 |
|
|
338 |
|
|
339 |
|
@param |
340 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
341 |
158
|
public void setFinished(final boolean finished) {... |
342 |
158
|
this.finished = finished; |
343 |
|
} |
344 |
|
|
345 |
|
|
346 |
|
|
347 |
|
|
348 |
|
|
349 |
|
@return |
350 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
351 |
78139
|
public double getVisitPercentage() {... |
352 |
78139
|
if (finished) { |
353 |
6
|
return 100; |
354 |
|
} |
355 |
78133
|
double result = (double) (importNumber) / (imports + 1) / (chapters + 3); |
356 |
78133
|
result += (double) (absoluteChapterNumber) / (chapters + 3); |
357 |
78133
|
result += (double) (absoluteSectionNumber) / (sections + 2) / (chapters + 3); |
358 |
78133
|
result += (double) (subsectionNumber + nodeNumber) |
359 |
|
/ (subsectionsAndNodes + 2) / (sections + 2) / (chapters + 3); |
360 |
78133
|
return 100 * result; |
361 |
|
} |
362 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
363 |
52108
|
public boolean equals(final Object compare) {... |
364 |
52108
|
if (!(compare instanceof QedeqNumbers)) { |
365 |
6
|
return false; |
366 |
|
} |
367 |
52102
|
final QedeqNumbers other = (QedeqNumbers) compare; |
368 |
52102
|
return imports == other.imports && importNumber == other.importNumber |
369 |
|
&& chapterNumbering == other.chapterNumbering |
370 |
|
&& absoluteChapterNumber == other.absoluteChapterNumber |
371 |
|
&& sectionNumbering == other.sectionNumbering |
372 |
|
&& sections == other.sections |
373 |
|
&& absoluteSectionNumber == other.absoluteSectionNumber |
374 |
|
&& subsectionNumber == other.subsectionNumber |
375 |
|
&& nodeNumber == other.nodeNumber |
376 |
|
&& axiomNumber == other.axiomNumber |
377 |
|
&& propositionNumber == other.propositionNumber |
378 |
|
&& predicateDefinitionNumber == other.predicateDefinitionNumber |
379 |
|
&& functionDefinitionNumber == other.functionDefinitionNumber |
380 |
|
&& ruleNumber == other.ruleNumber; |
381 |
|
} |
382 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
383 |
104204
|
public int hashCode() {... |
384 |
104204
|
return imports ^ (importNumber * 4) |
385 |
|
^ (chapters * 16) ^ (absoluteChapterNumber * 64) |
386 |
|
^ (sections * 256) ^ (absoluteSectionNumber * 1024) |
387 |
|
^ (subsectionsAndNodes * 4096) ^ (nodeNumber * 16384) ^ (subsectionNumber * 65536) |
388 |
|
^ (axiomNumber * 262144) ^ (propositionNumber * 1048576) |
389 |
|
^ (predicateDefinitionNumber * 4194304) |
390 |
|
^ (functionDefinitionNumber * 16777216) ^ (ruleNumber * 67108864); |
391 |
|
} |
392 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
393 |
52088
|
public String toString() {... |
394 |
52088
|
return "(" + importNumber + "/" + imports + " I) " |
395 |
|
+ "(" + absoluteChapterNumber + "/" + chapters + " C) " |
396 |
|
+ "(" + absoluteSectionNumber + "/" + sections + " S) " |
397 |
|
+ "(" + (subsectionNumber + nodeNumber) + "/" + subsectionsAndNodes + ")"; |
398 |
|
} |
399 |
|
|
400 |
|
} |