JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / MCview / Residue.js
1 Clazz.declarePackage ("MCview");\r
2 c$ = Clazz.decorateAsClass (function () {\r
3 this.atoms = null;\r
4 this.number = 0;\r
5 this.count = 0;\r
6 Clazz.instantialize (this, arguments);\r
7 }, MCview, "Residue");\r
8 Clazz.makeConstructor (c$, \r
9 function (resAtoms, number, count) {\r
10 this.atoms = resAtoms;\r
11 this.number = number;\r
12 this.count = count;\r
13 }, "java.util.Vector,~N,~N");\r
14 Clazz.defineMethod (c$, "findAtom", \r
15 function (name) {\r
16 for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) {\r
17 if (atom.name.equals (name)) {\r
18 return atom;\r
19 }}\r
20 return null;\r
21 }, "~S");\r