Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / MCview / Residue.js
1 Clazz.declarePackage ("MCview");
2 c$ = Clazz.decorateAsClass (function () {
3 this.atoms = null;
4 this.number = 0;
5 this.count = 0;
6 Clazz.instantialize (this, arguments);
7 }, MCview, "Residue");
8 Clazz.makeConstructor (c$, 
9 function (resAtoms, number, count) {
10 this.atoms = resAtoms;
11 this.number = number;
12 this.count = count;
13 }, "java.util.Vector,~N,~N");
14 Clazz.defineMethod (c$, "findAtom", 
15 function (name) {
16 for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) {
17 if (atom.name.equals (name)) {
18 return atom;
19 }}
20 return null;
21 }, "~S");