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