- java.lang.Object
-
- org.biojava.nbio.core.sequence.template.AbstractCompoundTranslator<F,T>
-
- All Implemented Interfaces:
CompoundTranslator<F,T>
- Direct Known Subclasses:
DNAToRNATranslator
,RNAToAminoAcidTranslator
public abstract class AbstractCompoundTranslator<F extends Compound,T extends Compound> extends Object implements CompoundTranslator<F,T>
-
-
Constructor Summary
Constructors Constructor Description AbstractCompoundTranslator(SequenceCreatorInterface<T> creator, CompoundSet<F> fromCompoundSet, CompoundSet<T> toCompoundSet)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addCompounds(F source, T... targets)
protected void
addCompoundsToList(List<T> compounds, List<List<T>> workingList)
protected void
addCompoundToLists(List<List<T>> list, T compound)
protected void
addStrings(String source, String... targets)
Sequence<T>
createSequence(Sequence<F> originalSequence)
List<Sequence<T>>
createSequences(Sequence<F> originalSequence)
SequenceCreatorInterface<T>
getCreator()
CompoundSet<F>
getFromCompoundSet()
CompoundSet<T>
getToCompoundSet()
protected abstract void
postProcessCompoundLists(List<List<T>> compoundLists)
T
translate(F fromCompound)
List<T>
translateMany(F fromCompound)
protected List<Sequence<T>>
workingListToSequences(List<List<T>> workingList)
-
-
-
Constructor Detail
-
AbstractCompoundTranslator
public AbstractCompoundTranslator(SequenceCreatorInterface<T> creator, CompoundSet<F> fromCompoundSet, CompoundSet<T> toCompoundSet)
-
-
Method Detail
-
getCreator
public SequenceCreatorInterface<T> getCreator()
-
getFromCompoundSet
public CompoundSet<F> getFromCompoundSet()
-
getToCompoundSet
public CompoundSet<T> getToCompoundSet()
-
addStrings
protected void addStrings(String source, String... targets)
-
addCompounds
protected void addCompounds(F source, T... targets)
-
translateMany
public List<T> translateMany(F fromCompound)
- Specified by:
translateMany
in interfaceCompoundTranslator<F extends Compound,T extends Compound>
-
createSequences
public List<Sequence<T>> createSequences(Sequence<F> originalSequence)
- Specified by:
createSequences
in interfaceCompoundTranslator<F extends Compound,T extends Compound>
-
postProcessCompoundLists
protected abstract void postProcessCompoundLists(List<List<T>> compoundLists)
-
workingListToSequences
protected List<Sequence<T>> workingListToSequences(List<List<T>> workingList)
-
addCompoundToLists
protected void addCompoundToLists(List<List<T>> list, T compound)
-
createSequence
public Sequence<T> createSequence(Sequence<F> originalSequence)
- Specified by:
createSequence
in interfaceCompoundTranslator<F extends Compound,T extends Compound>
-
-