1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.se.dto.module; |
17 |
|
|
18 |
|
import org.apache.commons.lang.ArrayUtils; |
19 |
|
import org.qedeq.base.utility.EqualsUtility; |
20 |
|
import org.qedeq.kernel.se.base.module.Conclusion; |
21 |
|
import org.qedeq.kernel.se.base.module.ConditionalProof; |
22 |
|
import org.qedeq.kernel.se.base.module.FormalProofLineList; |
23 |
|
import org.qedeq.kernel.se.base.module.Formula; |
24 |
|
import org.qedeq.kernel.se.base.module.Hypothesis; |
25 |
|
import org.qedeq.kernel.se.base.module.Reason; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
@author |
34 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (77) |
Complexity: 29 |
Complexity Density: 0.73 |
|
35 |
|
public class ConditionalProofVo implements ConditionalProof { |
36 |
|
|
37 |
|
|
38 |
|
private Hypothesis hypothesis; |
39 |
|
|
40 |
|
|
41 |
|
private FormalProofLineList formalProofLineList; |
42 |
|
|
43 |
|
|
44 |
|
private Conclusion conclusion; |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
@param |
50 |
|
@param |
51 |
|
@param |
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
53 |
454
|
public ConditionalProofVo(final Hypothesis hypothesis, final FormalProofLineList proofLines,... |
54 |
|
final Conclusion conclusion) { |
55 |
454
|
this.hypothesis = hypothesis; |
56 |
454
|
this.formalProofLineList = proofLines; |
57 |
454
|
this.conclusion = conclusion; |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
63 |
509
|
public ConditionalProofVo() {... |
64 |
|
|
65 |
|
} |
66 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
30
|
public ConditionalProof getConditionalProof() {... |
68 |
30
|
return this; |
69 |
|
} |
70 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
35815
|
public Hypothesis getHypothesis() {... |
72 |
35815
|
return hypothesis; |
73 |
|
} |
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
@param |
79 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
470
|
public void setHypothesis(final Hypothesis hypothesis) {... |
81 |
470
|
this.hypothesis = hypothesis; |
82 |
|
} |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
1
|
public String[] getReferences() {... |
85 |
1
|
return ArrayUtils.EMPTY_STRING_ARRAY; |
86 |
|
} |
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
@param |
92 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
466
|
public void setFormalProofLineList(final FormalProofLineList list) {... |
94 |
466
|
this.formalProofLineList = list; |
95 |
|
} |
96 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
97 |
40042
|
public FormalProofLineList getFormalProofLineList() {... |
98 |
40042
|
return formalProofLineList; |
99 |
|
} |
100 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
22484
|
public Conclusion getConclusion() {... |
102 |
22484
|
return conclusion; |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
@param |
109 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
474
|
public void setConclusion(final Conclusion conclusion) {... |
111 |
474
|
this.conclusion = conclusion; |
112 |
|
} |
113 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
114 |
1075
|
public Formula getFormula() {... |
115 |
1075
|
if (conclusion == null) { |
116 |
1
|
return null; |
117 |
|
} |
118 |
1074
|
return conclusion.getFormula(); |
119 |
|
} |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
121 |
3146
|
public String getLabel() {... |
122 |
3146
|
if (conclusion == null) { |
123 |
1
|
return null; |
124 |
|
} |
125 |
3145
|
return conclusion.getLabel(); |
126 |
|
} |
127 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
128 |
293
|
public String getName() {... |
129 |
293
|
return "CP"; |
130 |
|
} |
131 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
132 |
3013
|
public Reason getReason() {... |
133 |
3013
|
return this; |
134 |
|
} |
135 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
136 |
47
|
public boolean equals(final Object obj) {... |
137 |
47
|
if (!(obj instanceof ConditionalProofVo)) { |
138 |
5
|
return false; |
139 |
|
} |
140 |
42
|
final ConditionalProofVo other = (ConditionalProofVo) obj; |
141 |
42
|
return EqualsUtility.equals(hypothesis, other.hypothesis) |
142 |
|
&& EqualsUtility.equals(formalProofLineList, other.formalProofLineList) |
143 |
|
&& EqualsUtility.equals(conclusion, other.conclusion); |
144 |
|
} |
145 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 4 |
Complexity Density: 4 |
|
146 |
58
|
public int hashCode() {... |
147 |
58
|
return (hypothesis != null ? hypothesis.hashCode() : 0) |
148 |
58
|
^ (formalProofLineList != null ? 2 ^ formalProofLineList.hashCode() : 0) |
149 |
58
|
^ (conclusion != null ? 4 ^ conclusion.hashCode() : 0); |
150 |
|
} |
151 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (24) |
Complexity: 7 |
Complexity Density: 0.44 |
|
152 |
42
|
public String toString() {... |
153 |
42
|
StringBuffer result = new StringBuffer(); |
154 |
42
|
result.append(getName()); |
155 |
42
|
if (hypothesis != null || formalProofLineList != null || conclusion != null) { |
156 |
28
|
result.append(" ("); |
157 |
28
|
if (hypothesis != null) { |
158 |
18
|
result.append("\n"); |
159 |
18
|
result.append(hypothesis); |
160 |
|
} |
161 |
28
|
if (formalProofLineList != null) { |
162 |
16
|
result.append("\n"); |
163 |
16
|
result.append(formalProofLineList); |
164 |
|
} |
165 |
28
|
if (conclusion != null) { |
166 |
26
|
result.append("\n"); |
167 |
26
|
result.append(conclusion); |
168 |
|
} |
169 |
28
|
result.append("\n"); |
170 |
28
|
result.append(")"); |
171 |
|
} |
172 |
42
|
return result.toString(); |
173 |
|
} |
174 |
|
|
175 |
|
} |