|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pal.datatype.DataTypeUtils
helper class for sequence data types.
Constructor Summary | |
DataTypeUtils()
|
Method Summary | |
static byte[] |
getByteStates(char[] sequence,
DataType dt)
For converting a sequence to an array of bytes where each byte represents the state of the corresponding character in sequence |
static byte[] |
getByteStates(java.lang.String sequence,
DataType dt)
For converting a sequence to an array of bytes where each byte represents the state of the corresponding character in sequence |
static char[][] |
getChars(int[][] sequences,
char unknownChar,
DataType dt)
For converting an array of sequence to arrays of ints where each int represents the state of the corresponding character in sequence |
static char[] |
getChars(int[] sequence,
char unknownChar,
DataType dt)
For converting a sequence of ints representing states to an array of chars |
static DataType |
getInstance(int typeID)
create object according to this code |
static int[] |
getSequenceStates(DataType d,
java.lang.String sequence)
Return states of a sequence. |
static int[][] |
getStates(char[][] sequences,
DataType dt)
For converting an array of sequence to arrays of ints where each int represents the state of the corresponding character in sequence |
static int[][] |
getStates(char[][] sequences,
int unknownState,
DataType dt)
For converting an array of sequence to arrays of ints where each int represents the state of the corresponding character in sequence |
static int[] |
getStates(char[] sequence,
DataType dt)
For converting a sequence to an array of ints where each int represents the state of the corresponding character in sequence |
static int[] |
getStates(char[] sequence,
int unknownState,
DataType dt)
For converting a sequence to an array of ints where each int represents the state of the corresponding character in sequence |
static boolean |
isGap(DataType d,
char c)
returns true if the character represents a gap in the sequence. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataTypeUtils()
Method Detail |
public static DataType getInstance(int typeID)
typeID
- selected data typepublic static final int[] getSequenceStates(DataType d, java.lang.String sequence)
public static final boolean isGap(DataType d, char c)
public static final byte[] getByteStates(java.lang.String sequence, DataType dt)
public static final byte[] getByteStates(char[] sequence, DataType dt)
public static final int[][] getStates(char[][] sequences, DataType dt)
public static final int[] getStates(char[] sequence, DataType dt)
public static final int[][] getStates(char[][] sequences, int unknownState, DataType dt)
unknownState
- ensures that the state representation is set to this value (like -1)public static final int[] getStates(char[] sequence, int unknownState, DataType dt)
public static final char[][] getChars(int[][] sequences, char unknownChar, DataType dt)
unknownChar
- The character uses for unknown statespublic static final char[] getChars(int[] sequence, char unknownChar, DataType dt)
unknownChar
- The character uses for unknown states
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |