JAL-1807 test
[jalviewjs.git] / bin / com / stevesoft / pat / Multi.js
1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi", ["com.stevesoft.pat.Multi_stage2"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.a = null;
5 this.b = null;
6 this.p = null;
7 this.st2 = null;
8 this.matchFewest = false;
9 Clazz.instantialize (this, arguments);
10 }, com.stevesoft.pat, "Multi", com.stevesoft.pat.PatternSub);
11 Clazz.overrideMethod (c$, "minChars", 
12 function () {
13 return this.a.mul (this.p.countMinChars ());
14 });
15 Clazz.overrideMethod (c$, "maxChars", 
16 function () {
17 return this.b.mul (this.p.countMaxChars ());
18 });
19 Clazz.makeConstructor (c$, 
20 function (a, b, p) {
21 Clazz.superConstructor (this, com.stevesoft.pat.Multi, []);
22 this.a = a;
23 this.b = b;
24 this.p = p;
25 this.st2 =  new com.stevesoft.pat.Multi_stage2 (a, b, p);
26 this.st2.parent = this;
27 this.sub = this.st2.sub;
28 }, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern");
29 Clazz.overrideMethod (c$, "toString", 
30 function () {
31 this.st2.matchFewest = this.matchFewest;
32 return this.st2.toString ();
33 });
34 Clazz.overrideMethod (c$, "matchInternal", 
35 function (pos, pt) {
36 try {
37 this.st2 =  new com.stevesoft.pat.Multi_stage2 (this.a, this.b, this.p);
38 } catch (r__) {
39 if (Clazz.exceptionOf (r__, com.stevesoft.pat.RegSyntax)) {
40 } else {
41 throw r__;
42 }
43 }
44 this.st2.matchFewest = this.matchFewest;
45 this.st2.parent = this;
46 return this.st2.matchInternal (pos, pt);
47 }, "~N,com.stevesoft.pat.Pthings");
48 Clazz.overrideMethod (c$, "clone1", 
49 function (h) {
50 try {
51 var m =  new com.stevesoft.pat.Multi (this.a, this.b, (this.p).clone (h));
52 m.matchFewest = this.matchFewest;
53 return m;
54 } catch (rs) {
55 if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) {
56 return null;
57 } else {
58 throw rs;
59 }
60 }
61 }, "java.util.Hashtable");
62 });