X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FResidue.java;h=b01d982b94805ed8c4fe00c11e1bea77eeb462dd;hb=7e129811d6ff01074428462284dffc2a6c2395a4;hp=998e3880e035d89927b3e527a726ba9d7c338ec2;hpb=99c58ee0ae2a848f982552e53feaf6d5cb9925e5;p=jalview.git diff --git a/src/MCview/Residue.java b/src/MCview/Residue.java index 998e388..b01d982 100755 --- a/src/MCview/Residue.java +++ b/src/MCview/Residue.java @@ -16,32 +16,30 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - package MCview; import java.util.*; public class Residue { - Vector atoms = new Vector(); - - int number; - int count; - int seqnumber; - - public Residue(Vector atoms, int number, int count) { - this.atoms = atoms; - this.number = number; - this.count = count; - } + Vector atoms = new Vector(); + int number; + int count; + int seqnumber; + + public Residue(Vector atoms, int number, int count) { + this.atoms = atoms; + this.number = number; + this.count = count; + } - public myAtom findAtom(String name) { + public myAtom findAtom(String name) { + for (int i = 0; i < atoms.size(); i++) { + if (((myAtom) atoms.elementAt(i)).name.equals(name)) { + return (myAtom) atoms.elementAt(i); + } + } - for (int i = 0; i < atoms.size(); i++) { - if (((myAtom)atoms.elementAt(i)).name.equals(name)) { - return (myAtom)atoms.elementAt(i); - } + return null; } - return null; - } }