protected class CSVtoValueMatrixAbstract.ColumnInfo
extends java.lang.Object
Constructor and Description |
---|
CSVtoValueMatrixAbstract.ColumnInfo(java.lang.String name,
int datatype) |
CSVtoValueMatrixAbstract.ColumnInfo(java.lang.String name,
int datatype,
int noValues) |
Modifier and Type | Method and Description |
---|---|
int |
getDatatype() |
java.lang.String |
getName() |
TS_ValueSeq |
getValues() |
protected boolean |
parseBoolean(java.lang.String literal)
Parse a boolean value from string.
|
void |
reduceSize(int newLength)
Reduce the size of the values to set.
|
void |
setDatatype(int datatype) |
void |
setName(java.lang.String name) |
void |
setValue(java.lang.String strVal,
int partIndex)
Set the value of the column, parse the string to the correct datatype.
|
void |
setValues(TS_ValueSeq values) |
public CSVtoValueMatrixAbstract.ColumnInfo(java.lang.String name, int datatype)
public CSVtoValueMatrixAbstract.ColumnInfo(java.lang.String name, int datatype, int noValues)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic int getDatatype()
public void setDatatype(int datatype)
datatype
- the datatype to setpublic TS_ValueSeq getValues()
public void setValues(TS_ValueSeq values)
values
- the values to setpublic void reduceSize(int newLength) throws ExecutableException
newLength
- the new length of the array to reduce the size.ExecutableException
- a not implemented datatype.protected boolean parseBoolean(java.lang.String literal) throws java.text.ParseException
N
or F
will be parsed as false
.
Caseinsensitive literal starting with Y
or T
will be parsed as true
.
When the literal is a value and the value is not 0 the literal will be passed as true
.literal
- The literaljava.text.ParseException
- if parsing fails.public void setValue(java.lang.String strVal, int partIndex) throws ExecutableException
strVal
- the string valuepartIndex
- the index of the value.ExecutableException,
- forward of ParseException, a not implemented datatype or the index out of bound.ExecutableException