1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
package javax.jmdns.impl.constants; |
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
@author |
10 |
|
|
|
|
| 17.6% |
Uncovered Elements: 14 (17) |
Complexity: 6 |
Complexity Density: 0.6 |
|
11 |
|
public enum DNSOptionCode { |
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
Unknown("Unknown", 65535), |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
LLQ("LLQ", 1), |
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
UL("UL", 2), |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
NSID("NSID", 3), |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
Owner("Owner", 4); |
33 |
|
|
34 |
|
private final String _externalName; |
35 |
|
|
36 |
|
private final int _index; |
37 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
38 |
5
|
DNSOptionCode(String name, int index) {... |
39 |
5
|
_externalName = name; |
40 |
5
|
_index = index; |
41 |
|
} |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@return |
47 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
0
|
public String externalName() {... |
49 |
0
|
return _externalName; |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
@return |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0
|
public int indexValue() {... |
58 |
0
|
return _index; |
59 |
|
} |
60 |
|
|
61 |
|
|
62 |
|
@param |
63 |
|
@return |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
65 |
0
|
public static DNSOptionCode resultCodeForFlags(int optioncode) {... |
66 |
0
|
int maskedIndex = optioncode; |
67 |
0
|
for (DNSOptionCode aCode : DNSOptionCode.values()) { |
68 |
0
|
if (aCode._index == maskedIndex) return aCode; |
69 |
|
} |
70 |
0
|
return Unknown; |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0
|
@Override... |
74 |
|
public String toString() { |
75 |
0
|
return this.name() + " index " + this.indexValue(); |
76 |
|
} |
77 |
|
|
78 |
|
} |