1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.base.io; |
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
@author |
23 |
|
|
|
|
| 80% |
Uncovered Elements: 4 (20) |
Complexity: 8 |
Complexity Density: 0.67 |
|
24 |
|
public class SubTextInput extends TextInput { |
25 |
|
|
26 |
|
@link |
27 |
|
private final int absoluteStart; |
28 |
|
|
29 |
|
@link |
30 |
|
private final int absoluteEnd; |
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@param |
36 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
37 |
46
|
public SubTextInput(final String source) {... |
38 |
46
|
super(source); |
39 |
46
|
this.absoluteStart = 0; |
40 |
46
|
this.absoluteEnd = source.length(); |
41 |
|
} |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
@param |
48 |
|
@param |
49 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
50 |
4
|
public SubTextInput(final SubTextInput original, final int absoluteStart, final int absoluteEnd) {... |
51 |
4
|
super(original.getAbsoluteSubstring(absoluteStart, absoluteEnd)); |
52 |
4
|
this.absoluteStart = absoluteStart; |
53 |
4
|
this.absoluteEnd = absoluteEnd; |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
|
@link |
58 |
|
|
59 |
|
@return |
60 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
15
|
public int getAbsoluteStart() {... |
62 |
15
|
return absoluteStart; |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
|
@link |
67 |
|
|
68 |
|
@return |
69 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
2
|
public int getAbsoluteEnd() {... |
71 |
2
|
return absoluteEnd; |
72 |
|
} |
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
@return |
78 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
3
|
public int getAbsolutePosition() {... |
80 |
3
|
return getAbsoluteStart() + getPosition(); |
81 |
|
} |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
@param |
88 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
89 |
0
|
public void setAbsolutePosition(final int absolutePosition) {... |
90 |
0
|
setPosition(absolutePosition - getAbsoluteStart()); |
91 |
|
} |
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
@param |
98 |
|
@param |
99 |
|
@return |
100 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
101 |
5
|
public String getAbsoluteSubstring(final int absoluteFrom, final int absoluteTo) {... |
102 |
5
|
return getSubstring(absoluteFrom - getAbsoluteStart(), absoluteTo - getAbsoluteStart()); |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
@link |
107 |
|
|
108 |
|
|
109 |
|
@param |
110 |
|
@param |
111 |
|
@return |
112 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
113 |
0
|
public SubTextInput getSubTextInput(final int absoluteFrom, final int absoluteTo) {... |
114 |
0
|
return new SubTextInput(this, absoluteFrom, absoluteTo); |
115 |
|
} |
116 |
|
|
117 |
|
} |