JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / bin / com / stevesoft / pat / Backup.js
1 Clazz.declarePackage ("com.stevesoft.pat");\r
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Backup", ["com.stevesoft.pat.patInt"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.bk = 0;\r
5 Clazz.instantialize (this, arguments);\r
6 }, com.stevesoft.pat, "Backup", com.stevesoft.pat.Pattern);\r
7 Clazz.makeConstructor (c$, \r
8 function (ii) {\r
9 Clazz.superConstructor (this, com.stevesoft.pat.Backup, []);\r
10 this.bk = ii;\r
11 }, "~N");\r
12 Clazz.overrideMethod (c$, "toString", \r
13 function () {\r
14 return "(?" + (this.bk < 0 ? ">" + (-this.bk) : "<" + this.bk) + ")" + this.nextString ();\r
15 });\r
16 Clazz.overrideMethod (c$, "matchInternal", \r
17 function (pos, pt) {\r
18 if (pos < this.bk) {\r
19 return -1;\r
20 }return this.nextMatch (pos - this.bk, pt);\r
21 }, "~N,com.stevesoft.pat.Pthings");\r
22 Clazz.overrideMethod (c$, "minChars", \r
23 function () {\r
24 return  new com.stevesoft.pat.patInt (-this.bk);\r
25 });\r
26 Clazz.overrideMethod (c$, "maxChars", \r
27 function () {\r
28 return  new com.stevesoft.pat.patInt (-this.bk);\r
29 });\r
30 Clazz.overrideMethod (c$, "clone1", \r
31 function (h) {\r
32 return  new com.stevesoft.pat.Backup (this.bk);\r
33 }, "java.util.Hashtable");\r
34 });\r