Package 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
Constructors Constructor Description SimpleHomology()
Creates a new emptySimpleHomology
containing noAlignment
and noFeatureHolder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Alignment
getAlignment()
getAlignment
returns the alignment, which uses theHomologyFeature
s as keys.FeatureHolder
getFeatures()
getFeatures
returns the constituentHomologyFeature
s which are also used as the keys in the alignment.void
setAlignment(Alignment alignment)
setAlignment
sets the alignment which describes the homology.String
toString()
-
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
-
-
-
Constructor Detail
-
SimpleHomology
public SimpleHomology()
Creates a new emptySimpleHomology
containing noAlignment
and noFeatureHolder
.
-
-
Method Detail
-
getFeatures
public FeatureHolder getFeatures()
getFeatures
returns the constituentHomologyFeature
s which are also used as the keys in the alignment.- Specified by:
getFeatures
in interfaceHomology
- Returns:
- a
FeatureHolder
.
-
getAlignment
public Alignment getAlignment()
getAlignment
returns the alignment, which uses theHomologyFeature
s as keys.- Specified by:
getAlignment
in interfaceHomology
- Returns:
- an
Alignment
.
-
setAlignment
public void setAlignment(Alignment alignment) throws BioException, ChangeVetoException
setAlignment
sets the alignment which describes the homology. The alignment, should use theHomologyFeature
s as keys. A suitableFeatureHolder
is automatically created.- Parameters:
alignment
- anAlignment
.- Throws:
BioException
- if an error occurs.ChangeVetoException
- if theSimpleHomology
is locked.
-
-