pal.datatype
Class AminoAcids

java.lang.Object
  |
  +--pal.datatype.SimpleDataType
        |
        +--pal.datatype.AminoAcids
All Implemented Interfaces:
DataType, java.io.Serializable

public class AminoAcids
extends SimpleDataType

implements DataType for amino acids

See Also:
Serialized Form

Field Summary
static AminoAcids DEFAULT_INSTANCE
           
static char TERMINATE_CHARACTER
           
static int TERMINATE_STATE
           
 
Fields inherited from interface pal.datatype.DataType
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GENERALIZED_CODONS_DESCRIPTION, GENERALIZEDCODONS, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUCLEOTIDES, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN_CHARACTER
 
Constructor Summary
AminoAcids()
           
 
Method Summary
 char getChar(int state)
          get character corresponding to a given state
 java.lang.String getDescription()
          description of data type
 int getNumStates()
          get number of unique states
 int getState(char c)
          get state corresponding to a character
 int getTypeID()
          get numerical code describing the data type
 boolean isUnknownState(int state)
           
 
Methods inherited from class pal.datatype.SimpleDataType
getNumSimpleStates, getSimpleStates, isAmbiguousState, isGapChar, isUnknownChar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INSTANCE

public static final AminoAcids DEFAULT_INSTANCE

TERMINATE_CHARACTER

public static final char TERMINATE_CHARACTER

TERMINATE_STATE

public static final int TERMINATE_STATE
Constructor Detail

AminoAcids

public AminoAcids()
Method Detail

getNumStates

public int getNumStates()
Description copied from interface: DataType
get number of unique states
Following copied from interface: pal.datatype.DataType
Returns:
number of unique states

getState

public int getState(char c)
Description copied from interface: DataType
get state corresponding to a character
Following copied from interface: pal.datatype.DataType
Parameters:
c - character
Returns:
state

getChar

public char getChar(int state)
Description copied from interface: DataType
get character corresponding to a given state
Following copied from interface: pal.datatype.DataType
Parameters:
state - state return corresponding character

isUnknownState

public boolean isUnknownState(int state)
Overrides:
isUnknownState in class SimpleDataType
Following copied from interface: pal.datatype.DataType
Returns:
true if this state is an unknown state (the same as check if a state is >= the number of states... but neater)

getDescription

public java.lang.String getDescription()
Description copied from interface: DataType
description of data type
Following copied from interface: pal.datatype.DataType
Returns:
string describing the data type

getTypeID

public int getTypeID()
Description copied from interface: DataType
get numerical code describing the data type
Following copied from interface: pal.datatype.DataType
Returns:
numerical code