X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FBracket.js;fp=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FBracket.js;h=064ec348c5280561d4516b56d48007c90b5644da;hp=26a23031bda4c57f9986a11e2a9bb55c48eb889b;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/com/stevesoft/pat/Bracket.js b/site/j2s/com/stevesoft/pat/Bracket.js index 26a2303..064ec34 100644 --- a/site/j2s/com/stevesoft/pat/Bracket.js +++ b/site/j2s/com/stevesoft/pat/Bracket.js @@ -1,60 +1,60 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.Bracket", ["com.stevesoft.pat.patInt", "java.util.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.neg = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "Bracket", com.stevesoft.pat.Or); -Clazz.makeConstructor (c$, -function (n) { -Clazz.superConstructor (this, com.stevesoft.pat.Bracket, []); -this.neg = n; -}, "~B"); -Clazz.overrideMethod (c$, "leftForm", -function () { -if (this.neg) { -return "[^"; -} else { -return "["; -}}); -Clazz.overrideMethod (c$, "rightForm", -function () { -return "]"; -}); -Clazz.overrideMethod (c$, "sepForm", -function () { -return ""; -}); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (pos >= pt.src.length ()) { -return -1; -}var r = Clazz.superCall (this, com.stevesoft.pat.Bracket, "matchInternal", [pos, pt]); -if ((this.neg && r < 0) || (!this.neg && r >= 0)) { -return this.nextMatch (pos + 1, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -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$, "addOr", -function (p) { -this.pv = null; -this.v.addElement (p); -p.setParent (null); -return this; -}, "com.stevesoft.pat.Pattern"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var b = new com.stevesoft.pat.Bracket (this.neg); -b.v = new java.util.Vector (); -for (var i = 0; i < this.v.size (); i++) { -b.v.addElement ((this.v.elementAt (i)).clone1 (h)); -} -return b; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.Bracket", ["com.stevesoft.pat.patInt", "java.util.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.neg = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Bracket", com.stevesoft.pat.Or); +Clazz.makeConstructor (c$, +function (n) { +Clazz.superConstructor (this, com.stevesoft.pat.Bracket, []); +this.neg = n; +}, "~B"); +Clazz.overrideMethod (c$, "leftForm", +function () { +if (this.neg) { +return "[^"; +} else { +return "["; +}}); +Clazz.overrideMethod (c$, "rightForm", +function () { +return "]"; +}); +Clazz.overrideMethod (c$, "sepForm", +function () { +return ""; +}); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (pos >= pt.src.length ()) { +return -1; +}var r = Clazz.superCall (this, com.stevesoft.pat.Bracket, "matchInternal", [pos, pt]); +if ((this.neg && r < 0) || (!this.neg && r >= 0)) { +return this.nextMatch (pos + 1, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +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$, "addOr", +function (p) { +this.pv = null; +this.v.addElement (p); +p.setParent (null); +return this; +}, "com.stevesoft.pat.Pattern"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var b = new com.stevesoft.pat.Bracket (this.neg); +b.v = new java.util.Vector (); +for (var i = 0; i < this.v.size (); i++) { +b.v.addElement ((this.v.elementAt (i)).clone1 (h)); +} +return b; +}, "java.util.Hashtable"); +});