|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.example.table.DataRowFactory
public class DataRowFactory
Factory class for DataRow objects. One factory should be used for one ExampleTable only. This class is necessary to customize implementations of DataRowReader to create DataRows of arbitrary type.
| Field Summary | |
|---|---|
static int |
FIRST_TYPE_INDEX
|
static int |
LAST_TYPE_INDEX
|
static int |
TYPE_BOOLEAN_ARRAY
|
static int |
TYPE_BOOLEAN_SPARSE_ARRAY
|
static int |
TYPE_BYTE_ARRAY
|
static int |
TYPE_BYTE_SPARSE_ARRAY
|
static int |
TYPE_DOUBLE_ARRAY
|
static int |
TYPE_DOUBLE_SPARSE_ARRAY
|
static int |
TYPE_FLOAT_ARRAY
|
static int |
TYPE_FLOAT_SPARSE_ARRAY
|
static int |
TYPE_INT_ARRAY
|
static int |
TYPE_INT_SPARSE_ARRAY
|
static int |
TYPE_LONG_ARRAY
|
static int |
TYPE_LONG_SPARSE_ARRAY
|
static java.lang.String[] |
TYPE_NAMES
|
static int |
TYPE_SHORT_ARRAY
|
static int |
TYPE_SHORT_SPARSE_ARRAY
|
static int |
TYPE_SPARSE_MAP
|
| Constructor Summary | |
|---|---|
DataRowFactory(int type)
Deprecated. Please do not use this constructor any longer. Use the constructor DataRowFactory(int, char) instead. |
|
DataRowFactory(int type,
char decimalPointCharacter)
|
|
| Method Summary | |
|---|---|
DataRow |
create(java.lang.Double[] data,
Attribute[] attributes)
Creates a data row from an Object array. |
DataRow |
create(int size)
Creates a new DataRow with the given initial capacity. |
DataRow |
create(java.lang.Object[] data,
Attribute[] attributes)
Creates a data row from an Object array. |
DataRow |
create(java.lang.String[] strings,
Attribute[] attributes)
Creates a data row from an array of Strings. |
int |
getType()
Returns the type of the created data rows. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] TYPE_NAMES
public static final int FIRST_TYPE_INDEX
public static final int TYPE_DOUBLE_ARRAY
public static final int TYPE_FLOAT_ARRAY
public static final int TYPE_LONG_ARRAY
public static final int TYPE_INT_ARRAY
public static final int TYPE_SHORT_ARRAY
public static final int TYPE_BYTE_ARRAY
public static final int TYPE_BOOLEAN_ARRAY
public static final int TYPE_DOUBLE_SPARSE_ARRAY
public static final int TYPE_FLOAT_SPARSE_ARRAY
public static final int TYPE_LONG_SPARSE_ARRAY
public static final int TYPE_INT_SPARSE_ARRAY
public static final int TYPE_SHORT_SPARSE_ARRAY
public static final int TYPE_BYTE_SPARSE_ARRAY
public static final int TYPE_BOOLEAN_SPARSE_ARRAY
public static final int TYPE_SPARSE_MAP
public static final int LAST_TYPE_INDEX
| Constructor Detail |
|---|
@Deprecated public DataRowFactory(int type)
DataRowFactory(int, char) instead.
type - must be one out of
TYPE_DOUBLE_ARRAY, TYPE_FLOAT_ARRAY, TYPE_LONG_ARRAY, TYPE_INT_ARRAY, TYPE_SHORT_ARRAY, TYPE_BYTE_ARRAY, TYPE_BOOLEAN_ARRAY,
TYPE_DOUBLE_SPARSE_ARRAY, TYPE_FLOAT_SPARSE_ARRAY, TYPE_SHORT_SPARSE_ARRAY, TYPE_BYTE_SPARSE_ARRAY, TYPE_BOOLEAN_SPARSE_ARRAY,
or TYPE_SPARSE_MAP.
public DataRowFactory(int type,
char decimalPointCharacter)
type - must be one out of
TYPE_DOUBLE_ARRAY, TYPE_FLOAT_ARRAY, TYPE_LONG_ARRAY, TYPE_INT_ARRAY, TYPE_SHORT_ARRAY, TYPE_BYTE_ARRAY, TYPE_BOOLEAN_ARRAY,
TYPE_DOUBLE_SPARSE_ARRAY, TYPE_FLOAT_SPARSE_ARRAY, TYPE_LONG_SPARSE_ARRAY, TYPE_INT_SPARSE_ARRAY, TYPE_SHORT_SPARSE_ARRAY, TYPE_BYTE_SPARSE_ARRAY, TYPE_BOOLEAN_SPARSE_ARRAY,
or TYPE_SPARSE_MAP.decimalPointCharacter - the letter for decimal points, usually '.'| Method Detail |
|---|
public DataRow create(int size)
public DataRow create(java.lang.String[] strings,
Attribute[] attributes)
Double.parseDouble(String) .
FileDataRowReader
public DataRow create(java.lang.Object[] data,
Attribute[] attributes)
Attribute. If the
corresponding attribute is nominal, data[i] will be cast
to String. If it is numerical, it will be cast to Number.
java.lang.ClassCastException - if data class does not match attribute typeDatabaseDataRowReader
public DataRow create(java.lang.Double[] data,
Attribute[] attributes)
Attribute. If the
corresponding attribute is nominal, data[i] will be cast
to String. If it is numerical, it will be cast to Number.
java.lang.ClassCastException - if data class does not match attribute typeDatabaseDataRowReaderpublic int getType()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||