org.biojava.bio.seq.homol
Class SimpleHomology
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.homol.SimpleHomology
- All Implemented Interfaces:
- Homology, Changeable
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 . |
SimpleHomology
public SimpleHomology()
- Creates a new empty
SimpleHomology
containing no
Alignment
and no FeatureHolder
.
getFeatures
public FeatureHolder getFeatures()
getFeatures
returns the constituent
HomologyFeature
s 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
HomologyFeature
s 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
HomologyFeature
s 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 String toString()
- Overrides:
toString
in class Object