|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataArray
Can be used to locally store a certain number of rows. It provides random access to the stored rows. It maintains the min and max value for each column (min/max with respect to the row sample stored - not the entire data table). It provides a list of all values seen for each string column (i.e. a list of all values appearing in the rows stored - not the entire data table).
Method Summary | |
---|---|
DataTableSpec |
getDataTableSpec()
Get the table spec corresponding the the rows. |
int |
getFirstRowNumber()
|
DataCell |
getMaxValue(int colIdx)
|
DataCell |
getMinValue(int colIdx)
|
DataRow |
getRow(int idx)
Returns the row from the container with index idx . |
Set<DataCell> |
getValues(int colIdx)
Returns a set of all different values seen in the specified column. |
RowIterator |
iterator()
Returns a row iterator which returns each row one-by-one from the table. |
int |
size()
|
Method Detail |
---|
DataRow getRow(int idx)
idx
. Index
starts at zero and must be less than the size of the container (which
could be less than the number of rows requested at construction time as
the table could be shorter than that). The original row number in the
table can be reconstructed by adding the index to the result of the
getFirstRowNumber()
method.
idx
- the index of the row to return (must be between 0 and size of
the row container)
idx
IndexOutOfBoundsException
- if the row does not existSet<DataCell> getValues(int colIdx)
StringCell
(or derived from that).
The list will be in the order the values appeared in the rows read in. It
contains only the values showing in these rows, the complete table may
contain more values. The list doesn't contain "missing value" cells.
colIdx
- the index of the column to return the possible values for
null
for non-string columns.DataCell getMinValue(int colIdx)
colIdx
- the index of the column to return the min value for
null
if the number of rows actually stored is
zero, or the column contains only missing cells.DataCell getMaxValue(int colIdx)
colIdx
- the index of the column to return the max value for
null
if the number of rows actually stored is
zero, or the column contains only missing cells.int size()
int getFirstRowNumber()
i
in the container can be reconstructed by
i + getFirstRowNumber()
.RowIterator iterator()
DataTable
iterator
in interface DataTable
iterator
in interface Iterable<DataRow>
DataRow
to obtain the real type of the object.DataRow
DataTableSpec getDataTableSpec()
getDataTableSpec
in interface DataTable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |