1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.datamodel; |
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@author |
31 |
|
|
32 |
|
|
|
|
| 0% |
Uncovered Elements: 33 (33) |
Complexity: 11 |
Complexity Density: 0.61 |
|
33 |
|
public final class AlignedCodon |
34 |
|
{ |
35 |
|
|
36 |
|
public final int pos1; |
37 |
|
|
38 |
|
|
39 |
|
public final int pos2; |
40 |
|
|
41 |
|
|
42 |
|
public final int pos3; |
43 |
|
|
44 |
|
|
45 |
|
public final int peptideCol; |
46 |
|
|
47 |
|
|
48 |
|
public final String product; |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
50 |
0 |
public AlignedCodon(int i, int j, int k)... |
51 |
|
{ |
52 |
0 |
this(i, j, k, null, 0); |
53 |
|
} |
54 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
55 |
0 |
public AlignedCodon(int i, int j, int k, String prod, int prodCol)... |
56 |
|
{ |
57 |
0 |
pos1 = i; |
58 |
0 |
pos2 = j; |
59 |
0 |
pos3 = k; |
60 |
0 |
product = prod; |
61 |
0 |
peptideCol = prodCol; |
62 |
|
} |
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
@param |
68 |
|
@return |
69 |
|
@throws |
70 |
|
|
71 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 5 |
Complexity Density: 1.67 |
|
72 |
0 |
public int getBaseColumn(int base)... |
73 |
|
{ |
74 |
0 |
if (base < 1 || base > 3) |
75 |
|
{ |
76 |
0 |
throw new IllegalArgumentException(Integer.toString(base)); |
77 |
|
} |
78 |
0 |
return base == 1 ? pos1 : (base == 2 ? pos2 : pos3); |
79 |
|
} |
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
87 |
0 |
@Override... |
88 |
|
public boolean equals(Object o) |
89 |
|
{ |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
0 |
if (o == null) |
95 |
|
{ |
96 |
0 |
return true; |
97 |
|
} |
98 |
0 |
if (!(o instanceof AlignedCodon)) |
99 |
|
{ |
100 |
0 |
return false; |
101 |
|
} |
102 |
0 |
AlignedCodon ac = (AlignedCodon) o; |
103 |
0 |
return (pos1 == ac.pos1 && pos2 == ac.pos2 && pos3 == ac.pos3); |
104 |
|
} |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
106 |
0 |
@Override... |
107 |
|
public String toString() |
108 |
|
{ |
109 |
0 |
StringBuilder sb = new StringBuilder(); |
110 |
0 |
sb.append("[").append(pos1).append(", ").append(pos2).append(", ") |
111 |
|
.append(pos3).append("]"); |
112 |
0 |
return sb.toString(); |
113 |
|
} |
114 |
|
} |