Package pal.datatype
Class StateRemover
- java.lang.Object
-
- pal.datatype.SimpleDataType
-
- pal.datatype.StateRemover
-
- All Implemented Interfaces:
java.io.Serializable
,DataType
public class StateRemover extends SimpleDataType implements java.io.Serializable
A standard data type, but with characters removed- Version:
- $Id: StateRemover.java,v 1.14 2003/03/23 00:04:23 matt Exp $
- Author:
- Matthew Goode
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface pal.datatype.DataType
DataType.Utils
-
-
Field Summary
-
Fields 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 Constructor Description StateRemover(DataType toAdjust, int[] statesToRemove)
A translation array -> originalToAdjusted_["adjusted State"] = "original state"
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected char
getCharImpl(int state)
Get character corresponding to a given statejava.lang.String
getDescription()
description of data typeint
getNumStates()
get number of unique statesprotected int
getStateImpl(char c)
For sub classes to implement main functionality of getState.int
getTypeID()
get numerical code describing the data typeprotected boolean
isUnknownStateImpl(int state)
For subclasses to handle, without regard for gaps-
Methods inherited from class pal.datatype.SimpleDataType
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString
-
-
-
-
Constructor Detail
-
StateRemover
public StateRemover(DataType toAdjust, int[] statesToRemove)
A translation array -> originalToAdjusted_["adjusted State"] = "original state"
-
-
Method Detail
-
getNumStates
public int getNumStates()
Description copied from interface:DataType
get number of unique states- Specified by:
getNumStates
in interfaceDataType
- Returns:
- number of unique states
-
isUnknownStateImpl
protected final boolean isUnknownStateImpl(int state)
Description copied from class:SimpleDataType
For subclasses to handle, without regard for gaps- Specified by:
isUnknownStateImpl
in classSimpleDataType
-
getStateImpl
protected int getStateImpl(char c)
Description copied from class:SimpleDataType
For sub classes to implement main functionality of getState. Gaps do not need to be considered- Specified by:
getStateImpl
in classSimpleDataType
-
getCharImpl
protected char getCharImpl(int state)
Get character corresponding to a given state- Specified by:
getCharImpl
in classSimpleDataType
-
getDescription
public java.lang.String getDescription()
Description copied from interface:DataType
description of data type- Specified by:
getDescription
in interfaceDataType
- Returns:
- string describing the data type
-
-