Package pal.datatype
Class TwoStates
java.lang.Object
pal.datatype.SimpleDataType
pal.datatype.TwoStates
- All Implemented Interfaces:
Serializable,DataType
implements DataType for two-state data
- Version:
- $Id: TwoStates.java,v 1.9 2003/03/23 00:04:23 matt Exp $
- Author:
- Korbinian Strimmer, Alexei Drummond
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface pal.datatype.DataType
DataType.Utils -
Field Summary
FieldsFields inherited from interface pal.datatype.DataType
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GAP_BALANCED, GAP_BALANCED_DESCRIPTION, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUCLEOTIDES, NUMERIC, PRIMARY_SUGGESTED_GAP_CHARACTER, SUGGESTED_GAP_CHARACTERS, SUGGESTED_GAP_STATE, SUGGESTED_UNKNOWN_STATE, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN, UNKNOWN_CHARACTER, UNKNOWN_TLA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected chargetCharImpl(int state) description of data typeintget number of unique statesintgetStateImpl(char c) For sub classes to implement main functionality of getState.intget numerical code describing the data typeprotected final booleanisUnknownStateImpl(int state) For subclasses to handle, without regard for gapsMethods inherited from class pal.datatype.SimpleDataType
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString
-
Field Details
-
DEFAULT_INSTANCE
-
-
Constructor Details
-
TwoStates
public TwoStates()
-
-
Method Details
-
getNumStates
public int getNumStates()Description copied from interface:DataTypeget number of unique states- Returns:
- number of unique states
-
getStateImpl
public int getStateImpl(char c) Description copied from class:SimpleDataTypeFor sub classes to implement main functionality of getState. Gaps do not need to be considered- Specified by:
getStateImplin classSimpleDataType
-
isUnknownStateImpl
protected final boolean isUnknownStateImpl(int state) Description copied from class:SimpleDataTypeFor subclasses to handle, without regard for gaps- Specified by:
isUnknownStateImplin classSimpleDataType
-
getCharImpl
protected char getCharImpl(int state) - Specified by:
getCharImplin classSimpleDataType
-
getDescription
Description copied from interface:DataTypedescription of data type- Returns:
- string describing the data type
-
getTypeID
public int getTypeID()Description copied from interface:DataTypeget numerical code describing the data type- Returns:
- numerical code
-