1 Clazz.declarePackage ("jalview.datamodel");
\r
2 Clazz.load (null, "jalview.datamodel.AlignedCodon", ["java.lang.IllegalArgumentException", "$.StringBuilder"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
8 Clazz.instantialize (this, arguments);
\r
9 }, jalview.datamodel, "AlignedCodon");
\r
10 Clazz.makeConstructor (c$,
\r
11 function (i, j, k) {
\r
12 this.construct (i, j, k, null);
\r
14 Clazz.makeConstructor (c$,
\r
15 function (i, j, k, prod) {
\r
19 this.product = prod;
\r
21 Clazz.defineMethod (c$, "getBaseColumn",
\r
23 if (base < 1 || base > 3) {
\r
24 throw new IllegalArgumentException (Integer.toString (base));
\r
25 }return base == 1 ? this.pos1 : (base == 2 ? this.pos2 : this.pos3);
\r
27 Clazz.overrideMethod (c$, "equals",
\r
31 }if (!(Clazz.instanceOf (o, jalview.datamodel.AlignedCodon))) {
\r
34 return (this.pos1 == ac.pos1 && this.pos2 == ac.pos2 && this.pos3 == ac.pos3);
\r
36 Clazz.overrideMethod (c$, "toString",
\r
38 var sb = new StringBuilder ();
\r
39 sb.append ("[").append (this.pos1).append (", ").append (this.pos2).append (", ").append (this.pos3).append ("]");
\r
40 return sb.toString ();
\r