pal.datatype
Class StateRemover
java.lang.Object
|
+--pal.datatype.SimpleDataType
|
+--pal.datatype.StateRemover
- All Implemented Interfaces:
- DataType, java.io.Serializable
- public class StateRemover
- extends SimpleDataType
- implements java.io.Serializable
A standard data type, but with characters removed
- See Also:
- Serialized Form
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 |
StateRemover(DataType toAdjust,
int[] statesToRemove)
A translation array -> originalToAdjusted_["adjusted State"] = "original state" |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateRemover
public StateRemover(DataType toAdjust,
int[] statesToRemove)
- A translation array -> originalToAdjusted_["adjusted State"] = "original state"
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
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)
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)
- Get character corresponding to a given state
- Following copied from interface:
pal.datatype.DataType
- Parameters:
state
- state
return corresponding character
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