1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.util.matcher; |
22 |
|
|
23 |
|
import jalview.util.MessageManager; |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 7 |
Complexity Density: 0.64 |
|
29 |
|
public enum Condition |
30 |
|
{ |
31 |
|
Contains(false, true, "Contains"), |
32 |
|
NotContains(false, true, "NotContains"), Matches(false, true, "Matches"), |
33 |
|
NotMatches(false, true, "NotMatches"), Present(false, false, "Present"), |
34 |
|
NotPresent(false, false, "NotPresent"), EQ(true, true, "EQ"), |
35 |
|
NE(true, true, "NE"), LT(true, true, "LT"), LE(true, true, "LE"), |
36 |
|
GT(true, true, "GT"), GE(true, true, "GE"); |
37 |
|
|
38 |
|
private boolean numeric; |
39 |
|
|
40 |
|
private boolean needsAPattern; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
private String stableName; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
@param |
54 |
|
@return |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
56 |
0 |
public static Condition fromString(String stableName)... |
57 |
|
{ |
58 |
0 |
for (Condition c : values()) |
59 |
|
{ |
60 |
0 |
if (c.stableName.equalsIgnoreCase(stableName)) |
61 |
|
{ |
62 |
0 |
return c; |
63 |
|
} |
64 |
|
} |
65 |
0 |
return null; |
66 |
|
} |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
@param |
72 |
|
@param |
73 |
|
@param |
74 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
75 |
0 |
Condition(boolean isNumeric, boolean needsPattern, String stablename)... |
76 |
|
{ |
77 |
0 |
numeric = isNumeric; |
78 |
0 |
needsAPattern = needsPattern; |
79 |
0 |
stableName = stablename; |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
@return |
87 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
0 |
public boolean isNumeric()... |
89 |
|
{ |
90 |
0 |
return numeric; |
91 |
|
} |
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
@return |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0 |
public boolean needsAPattern()... |
100 |
|
{ |
101 |
0 |
return needsAPattern; |
102 |
|
} |
103 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
0 |
public String getStableName()... |
105 |
|
{ |
106 |
0 |
return stableName; |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
@return |
115 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
0 |
@Override... |
117 |
|
public String toString() |
118 |
|
{ |
119 |
0 |
return MessageManager.getStringOrReturn("label.matchCondition_", |
120 |
|
name()); |
121 |
|
} |
122 |
|
} |