meshi.molecularElements
Class ResidueIdentifier
java.lang.Object
meshi.molecularElements.ResidueIdentifier
- All Implemented Interfaces:
- java.lang.Comparable
public class ResidueIdentifier
- extends java.lang.Object
- implements java.lang.Comparable
A unique identifier for residues. This class deals
with the fact that proteins are not always comprised of a single
polypeptide chain and a residue's identity cannot be expressed
solely by its number in the polypeptide chain, as it was before.
Field number are determined
at creation and are final; field chain may be changed
later.
|
Method Summary |
java.lang.String |
chain()
|
int |
compareTo(java.lang.Object obj)
Compares this ResidueIdentifier to another object. |
boolean |
equals(java.lang.Object other)
Returns true if and only if this
ResidueIdentifier is equal to some other object. |
int |
number()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CHAIN
public static final java.lang.String DEFAULT_CHAIN
- See Also:
- Constant Field Values
chain
public final java.lang.String chain
number
public final java.lang.Integer number
ResidueIdentifier
public ResidueIdentifier(int number)
ResidueIdentifier
public ResidueIdentifier(java.lang.String chain,
int number)
- Main constructor of this class.
compareTo
public int compareTo(java.lang.Object obj)
- Compares
this ResidueIdentifier to another object.
The order is lexicographic: first the chains are compared and
if they are equal the numbers are compared.
- Specified by:
compareTo in interface java.lang.Comparable
- Throws:
java.lang.ClassCastException - if the given object is not a
ResidueIdentifier.
equals
public boolean equals(java.lang.Object other)
- Returns
true if and only if this
ResidueIdentifier is equal to some other object.
- Overrides:
equals in class java.lang.Object
number
public final int number()
chain
public final java.lang.String chain()