1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.se.common; |
17 |
|
|
18 |
|
import org.qedeq.base.utility.EqualsUtility; |
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
@author |
24 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (22) |
Complexity: 9 |
Complexity Density: 0.9 |
|
25 |
|
public final class RuleKey { |
26 |
|
|
27 |
|
|
28 |
|
private String name; |
29 |
|
|
30 |
|
|
31 |
|
private String version; |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@param |
37 |
|
@param |
38 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
39 |
31
|
public RuleKey(final String name, final String version) {... |
40 |
31
|
this.name = name; |
41 |
31
|
this.version = version; |
42 |
|
} |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
@return |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
44
|
public String getName() {... |
50 |
44
|
return name; |
51 |
|
} |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@return |
57 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
30
|
public String getVersion() {... |
59 |
30
|
return version; |
60 |
|
} |
61 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 3 |
|
62 |
7
|
public int hashCode() {... |
63 |
7
|
return (getName() != null ? getName().hashCode() : 0) |
64 |
7
|
^ (getVersion() != null ? getVersion().hashCode() : 0); |
65 |
|
} |
66 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
67 |
16
|
public boolean equals(final Object obj) {... |
68 |
16
|
if (!(obj instanceof RuleKey)) { |
69 |
4
|
return false; |
70 |
|
} |
71 |
12
|
final RuleKey other = (RuleKey) obj; |
72 |
12
|
return EqualsUtility.equals(getName(), other.getName()) |
73 |
|
&& EqualsUtility.equals(getVersion(), other.getVersion()); |
74 |
|
} |
75 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
4
|
public String toString() {... |
77 |
4
|
return getName() + " [" + getVersion() + "]"; |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
} |