public class StringAlignmentModelFactory extends java.lang.Object implements AlignmentModelFactory<java.lang.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<java.lang.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. |
java.lang.String |
createToken(AlignmentModel<java.lang.String> alignmentModel,
java.lang.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<java.lang.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<java.lang.String>
parameterMap
- a map with parameters describing the requirements to be met by the returned instancepublic java.lang.String createToken(AlignmentModel<java.lang.String> alignmentModel, java.lang.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<java.lang.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