org.biojava.bio.seq.homol
Class SimpleHomology
java.lang.Object
|
+--org.biojava.utils.AbstractChangeable
|
+--org.biojava.bio.seq.homol.SimpleHomology
- All Implemented Interfaces:
- Changeable, Homology
- public class SimpleHomology
- extends AbstractChangeable
- implements Homology
A no-frills implementation of Homology.
- Since:
- 1.2
- Author:
- Matthew Pocock, Keith James
|
Constructor Summary |
SimpleHomology()
Creates a new empty SimpleHomology containing no
Alignment and no FeatureHolder. |
|
Method Summary |
Alignment |
getAlignment()
getAlignment returns the alignment, which uses the
HomologyFeatures as keys. |
FeatureHolder |
getFeatures()
getFeatures returns the constituent
HomologyFeatures which are also used as the keys
in the alignment. |
void |
setAlignment(Alignment alignment)
setAlignment sets the alignment which describes
the homology. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimpleHomology
public SimpleHomology()
- Creates a new empty
SimpleHomology containing no
Alignment and no FeatureHolder.
getFeatures
public FeatureHolder getFeatures()
getFeatures returns the constituent
HomologyFeatures which are also used as the keys
in the alignment.
- Specified by:
getFeatures in interface Homology
- Returns:
- a
FeatureHolder.
getAlignment
public Alignment getAlignment()
getAlignment returns the alignment, which uses the
HomologyFeatures as keys.
- Specified by:
getAlignment in interface Homology
- Returns:
- an
Alignment.
setAlignment
public void setAlignment(Alignment alignment)
throws BioException,
ChangeVetoException
setAlignment sets the alignment which describes
the homology. The alignment, should use the
HomologyFeatures as keys. A suitable
FeatureHolder is automatically created.
- Parameters:
alignment - an Alignment.
- Throws:
BioException - if an error occurs.
ChangeVetoException - if the
SimpleHomology is locked.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object