X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FpatInt.js;h=b7226f7595b2d015be5b44cadf82286942924273;hp=2d65e56fa300e29275ed5f4a05fdf118bd92a4c8;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6 diff --git a/site/j2s/com/stevesoft/pat/patInt.js b/site/j2s/com/stevesoft/pat/patInt.js index 2d65e56..b7226f7 100644 --- a/site/j2s/com/stevesoft/pat/patInt.js +++ b/site/j2s/com/stevesoft/pat/patInt.js @@ -1,94 +1,94 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -c$ = Clazz.decorateAsClass (function () { -this.i = 0; -this.inf = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "patInt"); -Clazz.makeConstructor (c$, -function () { -this.i = 0; -this.inf = false; -}); -Clazz.makeConstructor (c$, -function (init) { -this.i = init; -this.inf = false; -}, "~N"); -Clazz.makeConstructor (c$, -function (p) { -this.i = p.i; -this.inf = p.inf; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "setInf", -function (b) { -this.inf = b; -if (b) { -this.i = 2147483647; -}}, "~B"); -Clazz.defineMethod (c$, "inc", -function () { -if (!this.inf) { -this.i++; -}}); -Clazz.defineMethod (c$, "dec", -function () { -if (!this.inf) { -this.i--; -}}); -Clazz.defineMethod (c$, "lessEq", -function (j) { -return !this.inf && (j.inf || this.i <= j.i); -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "equals", -function (j) { -return !j.inf && !this.inf && this.i == j.i; -}, "com.stevesoft.pat.patInt"); -Clazz.overrideMethod (c$, "toString", -function () { -if (this.inf) { -return ""; -} else { -return "" + this.i; -}}); -Clazz.defineMethod (c$, "pluseq", -function (p) { -if (this.inf || p.inf) { -this.setInf (true); -} else { -this.i += p.i; -}return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "mul", -function (p) { -if (this.inf || p.inf) { -return new com.stevesoft.pat.patInf (); -}return new com.stevesoft.pat.patInt (this.i * p.i); -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "mineq", -function (p) { -if (p.inf) { -return this; -}if (this.inf) { -this.i = p.i; -} else if (p.i < this.i) { -this.i = p.i; -}this.setInf (false); -return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "maxeq", -function (p) { -if (this.inf || p.inf) { -this.setInf (true); -return this; -}if (p.i > this.i) { -this.i = p.i; -}return this; -}, "com.stevesoft.pat.patInt"); -Clazz.defineMethod (c$, "finite", -function () { -return !this.inf; -}); -Clazz.defineMethod (c$, "intValue", -function () { -return this.inf ? 2147483647 : this.i; -}); +Clazz.declarePackage ("com.stevesoft.pat"); +c$ = Clazz.decorateAsClass (function () { +this.i = 0; +this.inf = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "patInt"); +Clazz.makeConstructor (c$, +function () { +this.i = 0; +this.inf = false; +}); +Clazz.makeConstructor (c$, +function (init) { +this.i = init; +this.inf = false; +}, "~N"); +Clazz.makeConstructor (c$, +function (p) { +this.i = p.i; +this.inf = p.inf; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "setInf", +function (b) { +this.inf = b; +if (b) { +this.i = 2147483647; +}}, "~B"); +Clazz.defineMethod (c$, "inc", +function () { +if (!this.inf) { +this.i++; +}}); +Clazz.defineMethod (c$, "dec", +function () { +if (!this.inf) { +this.i--; +}}); +Clazz.defineMethod (c$, "lessEq", +function (j) { +return !this.inf && (j.inf || this.i <= j.i); +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "equals", +function (j) { +return !j.inf && !this.inf && this.i == j.i; +}, "com.stevesoft.pat.patInt"); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.inf) { +return ""; +} else { +return "" + this.i; +}}); +Clazz.defineMethod (c$, "pluseq", +function (p) { +if (this.inf || p.inf) { +this.setInf (true); +} else { +this.i += p.i; +}return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "mul", +function (p) { +if (this.inf || p.inf) { +return new com.stevesoft.pat.patInf (); +}return new com.stevesoft.pat.patInt (this.i * p.i); +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "mineq", +function (p) { +if (p.inf) { +return this; +}if (this.inf) { +this.i = p.i; +} else if (p.i < this.i) { +this.i = p.i; +}this.setInf (false); +return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "maxeq", +function (p) { +if (this.inf || p.inf) { +this.setInf (true); +return this; +}if (p.i > this.i) { +this.i = p.i; +}return this; +}, "com.stevesoft.pat.patInt"); +Clazz.defineMethod (c$, "finite", +function () { +return !this.inf; +}); +Clazz.defineMethod (c$, "intValue", +function () { +return this.inf ? 2147483647 : this.i; +});