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 emptySimpleHomologycontaining noAlignmentand noFeatureHolder. -
Method Summary
Modifier and TypeMethodDescriptiongetAlignmentreturns the alignment, which uses theHomologyFeatures as keys.getFeaturesreturns the constituentHomologyFeatures which are also used as the keys in the alignment.voidsetAlignment(Alignment alignment) setAlignmentsets 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 emptySimpleHomologycontaining noAlignmentand noFeatureHolder.
-
-
Method Details
-
getFeatures
getFeaturesreturns the constituentHomologyFeatures which are also used as the keys in the alignment.- Specified by:
getFeaturesin interfaceHomology- Returns:
- a
FeatureHolder.
-
getAlignment
getAlignmentreturns the alignment, which uses theHomologyFeatures as keys.- Specified by:
getAlignmentin interfaceHomology- Returns:
- an
Alignment.
-
setAlignment
setAlignmentsets the alignment which describes the homology. The alignment, should use theHomologyFeatures as keys. A suitableFeatureHolderis automatically created.- Parameters:
alignment- anAlignment.- Throws:
BioException- if an error occurs.ChangeVetoException- if theSimpleHomologyis locked.
-
toString
-