1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.viewmodel.seqfeatures; |
22 |
|
|
23 |
|
import jalview.api.FeaturesDisplayedI; |
24 |
|
|
25 |
|
import java.util.Collection; |
26 |
|
import java.util.Collections; |
27 |
|
import java.util.HashSet; |
28 |
|
import java.util.Set; |
29 |
|
|
|
|
| 62.5% |
Uncovered Elements: 12 (32) |
Complexity: 13 |
Complexity Density: 0.68 |
|
30 |
|
public class FeaturesDisplayed implements FeaturesDisplayedI |
31 |
|
{ |
32 |
|
private Set<String> featuresDisplayed = new HashSet<>(); |
33 |
|
|
34 |
|
private Set<String> featuresRegistered = new HashSet<>(); |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
36 |
0 |
public FeaturesDisplayed(FeaturesDisplayedI featuresDisplayed2)... |
37 |
|
{ |
38 |
0 |
Set<String> fdisp = featuresDisplayed2.getVisibleFeatures(); |
39 |
0 |
for (String ftype : fdisp) |
40 |
|
{ |
41 |
0 |
featuresDisplayed.add(ftype); |
42 |
0 |
featuresRegistered.add(ftype); |
43 |
|
} |
44 |
|
} |
45 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
46 |
28 |
public FeaturesDisplayed()... |
47 |
|
{ |
48 |
|
} |
49 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
50 |
13 |
@Override... |
51 |
|
public Set<String> getVisibleFeatures() |
52 |
|
{ |
53 |
13 |
return Collections.unmodifiableSet(featuresDisplayed); |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
142 |
@Override... |
57 |
|
public boolean isVisible(String featureType) |
58 |
|
{ |
59 |
142 |
return featuresDisplayed.contains(featureType); |
60 |
|
} |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0 |
@Override... |
63 |
|
public boolean areVisible(Collection<String> featureTypes) |
64 |
|
{ |
65 |
0 |
return featuresDisplayed.containsAll(featureTypes); |
66 |
|
} |
67 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
68 |
11 |
@Override... |
69 |
|
public void clear() |
70 |
|
{ |
71 |
11 |
featuresDisplayed.clear(); |
72 |
11 |
featuresRegistered.clear(); |
73 |
|
} |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
75 |
0 |
@Override... |
76 |
|
public void setAllVisible(Collection<String> makeVisible) |
77 |
|
{ |
78 |
0 |
featuresDisplayed.addAll(makeVisible); |
79 |
0 |
featuresRegistered.addAll(makeVisible); |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0 |
@Override... |
83 |
|
public void setAllRegisteredVisible() |
84 |
|
{ |
85 |
0 |
featuresDisplayed.addAll(featuresRegistered); |
86 |
|
} |
87 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
88 |
101 |
@Override... |
89 |
|
public void setVisible(String featureType) |
90 |
|
{ |
91 |
101 |
featuresDisplayed.add(featureType); |
92 |
101 |
featuresRegistered.add(featureType); |
93 |
|
} |
94 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
95 |
14 |
@Override... |
96 |
|
public void setHidden(String featureType) |
97 |
|
{ |
98 |
14 |
featuresDisplayed.remove(featureType); |
99 |
14 |
featuresRegistered.add(featureType); |
100 |
|
} |
101 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
102 |
1 |
@Override... |
103 |
|
public boolean isRegistered(String type) |
104 |
|
{ |
105 |
1 |
return featuresRegistered.contains(type); |
106 |
|
} |
107 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
38 |
@Override... |
109 |
|
public int getVisibleFeatureCount() |
110 |
|
{ |
111 |
38 |
return featuresDisplayed.size(); |
112 |
|
} |
113 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
13 |
@Override... |
115 |
|
public int getRegisteredFeaturesCount() |
116 |
|
{ |
117 |
13 |
return featuresRegistered.size(); |
118 |
|
} |
119 |
|
} |