DATATYPE - the data type which can be returnedpublic interface DataSource<DATATYPE> extends Iterable<DATATYPE>
| Modifier and Type | Method and Description |
|---|---|
DATATYPE[] |
createTemporaryArray(int size)
Create a temporary array suitable for use with the
getRandomRows(Object[]) and getData(int, int, Object[])
methods. |
DATATYPE |
getData(int row)
Get the data for a given row
|
void |
getData(int startRow,
int stopRow,
DATATYPE[] data)
Get data between given rows.
|
void |
getRandomRows(DATATYPE[] data) |
int |
numDimensions() |
int |
size() |
forEach, iterator, spliteratorvoid getData(int startRow, int stopRow, DATATYPE[] data)
size().
data is guaranteed to have (stopRow - startRow) valid entriesstartRow - where to start (inclusive)stopRow - where to stop (exclusive)data - the array to fillDATATYPE getData(int row)
row - the row numberint numDimensions()
void getRandomRows(DATATYPE[] data)
data - a random set of data. This array is guaranteed to be filled.int size()
DATATYPE[] createTemporaryArray(int size)
getRandomRows(Object[]) and getData(int, int, Object[])
methods.size - the size of the array