1 Clazz.declarePackage ("com.stevesoft.pat");
\r
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.oneChar", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
8 Clazz.instantialize (this, arguments);
\r
9 }, com.stevesoft.pat, "oneChar", com.stevesoft.pat.Pattern);
\r
10 Clazz.makeConstructor (c$,
\r
12 Clazz.superConstructor (this, com.stevesoft.pat.oneChar, []);
\r
17 cu = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.c);
\r
18 cl = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.c);
\r
19 ct = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.c);
\r
23 } else if (this.c == cl) {
\r
29 }this.mask = this.c.charCodeAt (0) & this.altc.charCodeAt (0) & this.altc2.charCodeAt (0);
\r
31 Clazz.overrideMethod (c$, "matchInternal",
\r
32 function (pos, pt) {
\r
35 if (pos < pt.src.length () && !this.Masked (pos, pt) && ((p = pt.src.charAt (pos)) == this.c || (pt.ignoreCase && (p == this.altc || p == this.altc2)))) {
\r
36 ret = this.nextMatch (pos + 1, pt);
\r
38 }, "~N,com.stevesoft.pat.Pthings");
\r
39 Clazz.overrideMethod (c$, "toString",
\r
41 return com.stevesoft.pat.Pattern.protect ("" + this.c, "[]{}(),$,-\"^.", '\\') + this.nextString ();
\r
43 Clazz.overrideMethod (c$, "minChars",
\r
45 return new com.stevesoft.pat.patInt (1);
\r
47 Clazz.overrideMethod (c$, "maxChars",
\r
49 return new com.stevesoft.pat.patInt (1);
\r
51 Clazz.overrideMethod (c$, "clone1",
\r
53 return new com.stevesoft.pat.oneChar (this.c);
\r
54 }, "java.util.Hashtable");
\r