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
A no-frills implementation of Homology.
- Since:
- 1.2
- Author:
- Matthew Pocock, Keith James
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new emptySimpleHomology
containing noAlignment
and noFeatureHolder
. -
Method Summary
Modifier and TypeMethodDescriptiongetAlignment
returns the alignment, which uses theHomologyFeature
s as keys.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.toString()
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
SimpleHomology
public SimpleHomology()Creates a new emptySimpleHomology
containing noAlignment
and noFeatureHolder
.
-
-
Method Details
-
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
getAlignment
returns the alignment, which uses theHomologyFeature
s as keys.- Specified by:
getAlignment
in interfaceHomology
- Returns:
- an
Alignment
.
-
setAlignment
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.
-
toString
-