JAL-1807 test
[jalviewjs.git] / bin / com / stevesoft / pat / Custom.js
1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Custom", ["com.stevesoft.pat.Regex"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.select = null;
5 this.v = null;
6 this.start = 0;
7 Clazz.instantialize (this, arguments);
8 }, com.stevesoft.pat, "Custom", com.stevesoft.pat.PatternSub);
9 Clazz.makeConstructor (c$, 
10 function (s) {
11 Clazz.superConstructor (this, com.stevesoft.pat.Custom, []);
12 this.select = s;
13 this.v = com.stevesoft.pat.Regex.validators.get (s);
14 }, "~S");
15 Clazz.defineMethod (c$, "matchInternal", 
16 function (pos, pt) {
17 this.start = pos;
18 return this.sub.matchInternal (pos, pt);
19 }, "~N,com.stevesoft.pat.Pthings");
20 Clazz.overrideMethod (c$, "toString", 
21 function () {
22 var a = this.v.argsave == null ? "" : ":" + this.v.argsave;
23 return "(??" + this.select + a + ")" + this.nextString ();
24 });
25 Clazz.overrideMethod (c$, "minChars", 
26 function () {
27 return this.v.minChars ();
28 });
29 Clazz.overrideMethod (c$, "maxChars", 
30 function () {
31 return this.v.maxChars ();
32 });
33 Clazz.overrideMethod (c$, "clone1", 
34 function (h) {
35 var c =  new com.stevesoft.pat.Custom (this.select);
36 h.put (c, c);
37 h.put (this, c);
38 c.sub = this.sub.clone (h);
39 return c;
40 }, "java.util.Hashtable");
41 });