public class StringAlignmentModelFactory extends Object implements AlignmentModelFactory<String>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_AMINO_ACID_CHARACTER_STATE_COUNT |
Constructor and Description |
---|
StringAlignmentModelFactory() |
Modifier and Type | Method and Description |
---|---|
AlignmentModel<String> |
createNewModel(NewAlignmentModelParameterMap parameterMap)
Creates a new instance of
PackedAlignmentModel if the number of tokens is specified (using
NewAlignmentModelParameterMap.KEY_CHARACTER_STATE_COUNT ) or ArrayListAlignmentModel if not. |
String |
createToken(AlignmentModel<String> alignmentModel,
String tokenRepresentation)
Creates the token using the token set of the specified alignment model.
|
public static final int DEFAULT_AMINO_ACID_CHARACTER_STATE_COUNT
public StringAlignmentModelFactory()
public AlignmentModel<String> createNewModel(NewAlignmentModelParameterMap parameterMap)
PackedAlignmentModel
if the number of tokens is specified (using
NewAlignmentModelParameterMap.KEY_CHARACTER_STATE_COUNT
) or ArrayListAlignmentModel
if not.createNewModel
in interface AlignmentModelFactory<String>
parameterMap
- a map with parameters describing the requirements to be met by the returned instancepublic String createToken(AlignmentModel<String> alignmentModel, String tokenRepresentation)
Overwrite this method to support more or different token string representations than the token set of the alignment model.
createToken
in interface AlignmentModelFactory<String>
alignmentModel
- the alignment model which will hold the returned tokentokenRepresentation
- the string representation of the token to be returned (e.g. read from
an alignment file)InvalidTokenException
- if no token for the specified representation could be found in the token set
of the specified alignment model