1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package com.stevesoft.pat; |
9 |
|
|
10 |
|
import java.util.Hashtable; |
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
@see |
17 |
|
@see |
18 |
|
|
|
|
| 50% |
Uncovered Elements: 13 (26) |
Complexity: 8 |
Complexity Density: 0.4 |
|
19 |
|
class Multi extends PatternSub |
20 |
|
{ |
21 |
|
patInt a, b; |
22 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
23 |
0 |
public patInt minChars()... |
24 |
|
{ |
25 |
0 |
return a.mul(p.countMinChars()); |
26 |
|
} |
27 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
28 |
0 |
public patInt maxChars()... |
29 |
|
{ |
30 |
0 |
return b.mul(p.countMaxChars()); |
31 |
|
} |
32 |
|
|
33 |
|
Pattern p; |
34 |
|
|
35 |
|
Multi_stage2 st2; |
36 |
|
|
37 |
|
public boolean matchFewest = false; |
38 |
|
|
39 |
|
|
40 |
|
@param |
41 |
|
|
42 |
|
@param |
43 |
|
|
44 |
|
@param |
45 |
|
|
46 |
|
@see |
47 |
|
@see |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
49 |
8 |
public Multi(patInt a, patInt b, Pattern p) throws RegSyntax... |
50 |
|
{ |
51 |
8 |
this.a = a; |
52 |
8 |
this.b = b; |
53 |
8 |
this.p = p; |
54 |
8 |
st2 = new Multi_stage2(a, b, p); |
55 |
8 |
st2.parent = this; |
56 |
8 |
sub = st2.sub; |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
59 |
0 |
public String toString()... |
60 |
|
{ |
61 |
0 |
st2.matchFewest = matchFewest; |
62 |
0 |
return st2.toString(); |
63 |
|
} |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
|
65 |
8 |
public int matchInternal(int pos, Pthings pt)... |
66 |
|
{ |
67 |
8 |
try |
68 |
|
{ |
69 |
8 |
st2 = new Multi_stage2(a, b, p); |
70 |
|
} catch (RegSyntax r__) |
71 |
|
{ |
72 |
|
} |
73 |
8 |
st2.matchFewest = matchFewest; |
74 |
8 |
st2.parent = this; |
75 |
8 |
return st2.matchInternal(pos, pt); |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
|
78 |
0 |
public Pattern clone1(Hashtable h)... |
79 |
|
{ |
80 |
0 |
try |
81 |
|
{ |
82 |
0 |
Multi m = new Multi(a, b, ((Pattern) p).clone(h)); |
83 |
0 |
m.matchFewest = matchFewest; |
84 |
0 |
return m; |
85 |
|
} catch (RegSyntax rs) |
86 |
|
{ |
87 |
0 |
return null; |
88 |
|
} |
89 |
|
} |
90 |
|
}; |