Package pal.datatype

Class StateRemover

All Implemented Interfaces:
Serializable, DataType

public class StateRemover extends SimpleDataType implements 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:
  • Constructor Details

    • StateRemover

      public StateRemover(DataType toAdjust, int[] statesToRemove)
      A translation array -> originalToAdjusted_["adjusted State"] = "original state"
  • Method Details

    • getNumStates

      public int getNumStates()
      Description copied from interface: DataType
      get number of unique states
      Specified by:
      getNumStates in interface DataType
      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 class SimpleDataType
    • 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 class SimpleDataType
    • getCharImpl

      protected char getCharImpl(int state)
      Get character corresponding to a given state
      Specified by:
      getCharImpl in class SimpleDataType
    • getDescription

      public String getDescription()
      Description copied from interface: DataType
      description of data type
      Specified by:
      getDescription in interface DataType
      Returns:
      string describing the data type
    • getTypeID

      public int getTypeID()
      Description copied from interface: DataType
      get numerical code describing the data type
      Specified by:
      getTypeID in interface DataType
      Returns:
      numerical code