ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/trunk/proteinstructure/AIGNode.java
Revision: 492
Committed: Wed Jan 2 13:18:57 2008 UTC (16 years, 9 months ago) by duarte
File size: 1054 byte(s)
Log Message:
Copied the aglappe-jung branch into trunk.

Line File contents
1 package proteinstructure;
2
3 public class AIGNode {
4
5 private int atomSerial;
6 private String atomName;
7 private RIGNode parentResidue;
8
9 public AIGNode(int atomSerial, String atomName, RIGNode parentResidue) {
10 this.atomSerial = atomSerial;
11 this.atomName = atomName;
12 this.parentResidue = parentResidue;
13 }
14
15 public int getAtomSerial() {
16 return this.atomSerial;
17 }
18
19 public String getAtomName() {
20 return this.atomName;
21 }
22
23 public RIGNode getParent() {
24 return this.parentResidue;
25 }
26
27 /**
28 * Convenience method to get the residue serial for this atom node
29 * @return
30 */
31 public int getResidueSerial() {
32 return this.parentResidue.getResidueSerial();
33 }
34
35 public boolean equals(Object obj) {
36 if (obj instanceof AIGNode) {
37 AIGNode v = (AIGNode) obj;
38 return ((this.parentResidue.equals(v.getParent())) && (this.atomSerial == v.getAtomSerial()) && (this.atomName.equals(v.getAtomName())));
39 } else {
40 return false;
41 }
42 }
43
44 public AIGNode copy() {
45 return (new AIGNode(atomSerial, atomName, this.parentResidue.copy()));
46 }
47 }