Package org.biojava.bio.symbol
Class PackedSymbolListFactory
- java.lang.Object
-
- org.biojava.bio.symbol.PackedSymbolListFactory
-
- All Implemented Interfaces:
SymbolListFactory
public class PackedSymbolListFactory extends Object implements SymbolListFactory
This class makes PackedSymbolLists. It could be refactored into the PackedSymbolList class eventually.- Author:
- David Huen
-
-
Constructor Summary
Constructors Constructor Description PackedSymbolListFactory()
Create a factory for PackedSymbolLists.PackedSymbolListFactory(boolean ambiguity)
Deprecated.the argumentless constructor creates a SymbolListFactory that will autoselect the packing appropriately.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymbolList
makeSymbolList(Symbol[] symbolArray, int size, Alphabet alfa)
Makes a packed SymbolList out of a list of Symbols.
-
-
-
Constructor Detail
-
PackedSymbolListFactory
public PackedSymbolListFactory()
Create a factory for PackedSymbolLists. The use of ambiguity packing is determined automatically as required.
-
PackedSymbolListFactory
public PackedSymbolListFactory(boolean ambiguity)
Deprecated.the argumentless constructor creates a SymbolListFactory that will autoselect the packing appropriately.Create a factory for PackedSymbolLists with specified packing type.- Parameters:
ambiguity
- is ambiguity to be supported by the encoding?
-
-
Method Detail
-
makeSymbolList
public SymbolList makeSymbolList(Symbol[] symbolArray, int size, Alphabet alfa) throws IllegalAlphabetException
Makes a packed SymbolList out of a list of Symbols.- Specified by:
makeSymbolList
in interfaceSymbolListFactory
- Parameters:
symbolArray
- the symbols to be make in a packed SymbolListsize
- the length of the symbolArray array.alfa
- the Alphabet over which the SymbolList shoudl be- Returns:
- a packed SymbolList with the Symbols in symbolArray and the Alphabet in alfa
- Throws:
IllegalAlphabetException
- if alfa and the Symbols in symbolArray disagree.
-
-