X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FoneChar.js;h=1fbc400027de9240f1f7907bee09e7d9b7c5b13f;hp=3dac704ca53fb3162a6b5a6ba599666568dc449a;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/com/stevesoft/pat/oneChar.js b/site/j2s/com/stevesoft/pat/oneChar.js index 3dac704..1fbc400 100644 --- a/site/j2s/com/stevesoft/pat/oneChar.js +++ b/site/j2s/com/stevesoft/pat/oneChar.js @@ -1,55 +1,55 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.oneChar", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.c = '\0'; -this.altc = '\0'; -this.altc2 = '\0'; -this.mask = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "oneChar", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (ci) { -Clazz.superConstructor (this, com.stevesoft.pat.oneChar, []); -this.c = ci; -var cu; -var cl; -var ct; -cu = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.c); -cl = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.c); -ct = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.c); -if (this.c == cu) { -this.altc = cl; -this.altc2 = ct; -} else if (this.c == cl) { -this.altc = cu; -this.altc2 = ct; -} else { -this.altc = cl; -this.altc2 = cu; -}this.mask = this.c.charCodeAt (0) & this.altc.charCodeAt (0) & this.altc2.charCodeAt (0); -}, "~S"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -var p; -var ret = -1; -if (pos < pt.src.length () && !this.Masked (pos, pt) && ((p = pt.src.charAt (pos)) == this.c || (pt.ignoreCase && (p == this.altc || p == this.altc2)))) { -ret = this.nextMatch (pos + 1, pt); -}return ret; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "toString", -function () { -return com.stevesoft.pat.Pattern.protect ("" + this.c, "[]{}(),$,-\"^.", '\\') + this.nextString (); -}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (1); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.oneChar (this.c); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.oneChar", ["com.stevesoft.pat.CaseMgr", "$.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.c = '\0'; +this.altc = '\0'; +this.altc2 = '\0'; +this.mask = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "oneChar", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (ci) { +Clazz.superConstructor (this, com.stevesoft.pat.oneChar, []); +this.c = ci; +var cu; +var cl; +var ct; +cu = com.stevesoft.pat.CaseMgr.toUpperCaseC (this.c); +cl = com.stevesoft.pat.CaseMgr.toLowerCaseC (this.c); +ct = com.stevesoft.pat.CaseMgr.toTitleCaseC (this.c); +if (this.c == cu) { +this.altc = cl; +this.altc2 = ct; +} else if (this.c == cl) { +this.altc = cu; +this.altc2 = ct; +} else { +this.altc = cl; +this.altc2 = cu; +}this.mask = this.c.charCodeAt (0) & this.altc.charCodeAt (0) & this.altc2.charCodeAt (0); +}, "~S"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +var p; +var ret = -1; +if (pos < pt.src.length () && !this.Masked (pos, pt) && ((p = pt.src.charAt (pos)) == this.c || (pt.ignoreCase && (p == this.altc || p == this.altc2)))) { +ret = this.nextMatch (pos + 1, pt); +}return ret; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +return com.stevesoft.pat.Pattern.protect ("" + this.c, "[]{}(),$,-\"^.", '\\') + this.nextString (); +}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (1); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.oneChar (this.c); +}, "java.util.Hashtable"); +});