DATATYPE
- the data type which can be returnedELEMENTTYPE
- the datatype of the underlying listspublic abstract class AbstractMultiListDataSource<DATATYPE,ELEMENTTYPE> extends AbstractDataSource<DATATYPE>
DataSource
backed by multiple lists of data.Modifier and Type | Field and Description |
---|---|
protected List<? extends List<ELEMENTTYPE>> |
data |
Constructor and Description |
---|
AbstractMultiListDataSource(List<? extends List<ELEMENTTYPE>> data)
Construct with the given lists of data
|
AbstractMultiListDataSource(List<ELEMENTTYPE>... data)
Construct with the given lists of data
|
AbstractMultiListDataSource(Map<?,? extends List<ELEMENTTYPE>> data)
Construct with the given map of data.
|
Modifier and Type | Method and Description |
---|---|
protected abstract DATATYPE |
convert(ELEMENTTYPE ele)
Convert an item's type
|
DATATYPE |
getData(int row)
Get the data for a given row
|
void |
getData(int startRow,
int stopRow,
DATATYPE[] data)
Get data between given rows.
|
int |
numRows() |
getRandomRows, iterator
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
numDimensions
protected List<? extends List<ELEMENTTYPE>> data
public AbstractMultiListDataSource(List<? extends List<ELEMENTTYPE>> data)
data
- the datapublic AbstractMultiListDataSource(List<ELEMENTTYPE>... data)
data
- the datapublic AbstractMultiListDataSource(Map<?,? extends List<ELEMENTTYPE>> data)
data
- the datapublic void getData(int startRow, int stopRow, DATATYPE[] data)
DataSource
DataSource.numRows()
.
data is guaranteed to have (stopRow - startRow) valid entriesstartRow
- where to start (inclusive)stopRow
- where to stop (exclusive)data
- the array to fillpublic DATATYPE getData(int row)
DataSource
row
- the row numberprotected abstract DATATYPE convert(ELEMENTTYPE ele)
ele
- the input itempublic int numRows()