1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.bo.logic.proof.finder; |
17 |
|
|
18 |
|
import org.qedeq.base.utility.EqualsUtility; |
19 |
|
import org.qedeq.kernel.se.base.list.Element; |
20 |
|
import org.qedeq.kernel.se.base.module.SubstPred; |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
@author |
27 |
|
|
|
|
| 26.1% |
Uncovered Elements: 34 (46) |
Complexity: 15 |
Complexity Density: 0.54 |
|
28 |
|
public class SubstPredBo implements SubstPred { |
29 |
|
|
30 |
|
|
31 |
|
private int n; |
32 |
|
|
33 |
|
|
34 |
|
private Element predicateVariable; |
35 |
|
|
36 |
|
|
37 |
|
private Element substituteFormula; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
@param |
43 |
|
@param |
44 |
|
@param |
45 |
|
|
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
47 |
75581
|
public SubstPredBo(final int n, final Element predicateVariable,... |
48 |
|
final Element substituteFormula) { |
49 |
75581
|
this.n = n; |
50 |
75581
|
this.predicateVariable = predicateVariable; |
51 |
75581
|
this.substituteFormula = substituteFormula; |
52 |
|
} |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
54 |
0
|
public SubstPred getSubstPred() {... |
55 |
0
|
return this; |
56 |
|
} |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
61
|
public String getReference() {... |
59 |
61
|
return "" + n; |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
@param |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
public void setN(final int n) {... |
68 |
0
|
this.n = n; |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
@return |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
56
|
public int getN() {... |
77 |
56
|
return n; |
78 |
|
} |
79 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
0
|
public String[] getReferences() {... |
81 |
0
|
return new String[] {getReference()}; |
82 |
|
} |
83 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
89
|
public Element getPredicateVariable() {... |
85 |
89
|
return predicateVariable; |
86 |
|
} |
87 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
89
|
public Element getSubstituteFormula() {... |
89 |
89
|
return substituteFormula; |
90 |
|
} |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0
|
public String getName() {... |
93 |
0
|
return "SubstPred"; |
94 |
|
} |
95 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
96 |
0
|
public boolean equals(final Object obj) {... |
97 |
0
|
if (!(obj instanceof SubstPred)) { |
98 |
0
|
return false; |
99 |
|
} |
100 |
0
|
final SubstPred other = (SubstPred) obj; |
101 |
0
|
return EqualsUtility.equals(getReference(), other.getReference()) |
102 |
|
&& EqualsUtility.equals(predicateVariable, other.getPredicateVariable()) |
103 |
|
&& EqualsUtility.equals(substituteFormula, other.getSubstituteFormula()); |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
106 |
0
|
public int hashCode() {... |
107 |
0
|
return getReference().hashCode() |
108 |
|
^ (2 ^ getPredicateVariable().hashCode()) |
109 |
|
^ (3 ^ getSubstituteFormula().hashCode()); |
110 |
|
} |
111 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 3 |
Complexity Density: 0.25 |
|
112 |
0
|
public String toString() {... |
113 |
0
|
StringBuffer result = new StringBuffer(); |
114 |
0
|
result.append("SubstPred"); |
115 |
0
|
result.append(" ("); |
116 |
0
|
result.append(getReference()); |
117 |
0
|
if (getPredicateVariable() != null) { |
118 |
0
|
result.append(", "); |
119 |
0
|
result.append(getPredicateVariable()); |
120 |
|
} |
121 |
0
|
if (getSubstituteFormula() != null) { |
122 |
0
|
result.append("by "); |
123 |
0
|
result.append(getSubstituteFormula()); |
124 |
|
} |
125 |
0
|
result.append(")"); |
126 |
0
|
return result.toString(); |
127 |
|
} |
128 |
|
|
129 |
|
} |