public class DataSet extends Object
Constructor and Description |
---|
DataSet(String dataSetID_p,
List<Map<String,Object>> dataRecordList_p) |
Modifier and Type | Method and Description |
---|---|
int |
clear()
clears all records in the data set and return the # of records cleared.
|
String |
describe()
returns a string representation of this data set.
|
int |
getCurrentRowIndex()
returns the current row index.
|
Map<String,Object> |
getCurRow()
returns the current data set row in a Map record.
|
Object |
getData(int rowNum_p,
String fieldName_p)
Returns the data field at the record number passed in.
|
Object |
getData(String fieldName_p)
Returns the data field value for the fieldName_p passed in at current row.
|
String |
getDataSetID()
returns the data set id.
|
List<Map<String,Object>> |
getDataSetRecordList()
return all rows in the dataset in a list.
|
int |
getRowCount()
returns the row count of the data set.
|
boolean |
isAtFirstRow()
returns true if dataset current row is set to the first row.
|
boolean |
isAtLastRow()
returns true if data set current row is set at the last row.
|
boolean |
isAutoRewind()
returns true if data set should automatically start at the first
row when it reaches the end of the dataset.
|
int |
nextRow()
Moves the record position of this data set to the next record by adding the internally maintained integer index attribute by 1.
|
int |
previousRow()
set current row to the previous row.
|
int |
rewind()
Resets the current row number of this data set to 0.
|
void |
setAutoRewind(boolean auto_p) |
int |
setRowIndex(int rowNum_p)
Returns true if the record can be set to the rowNum_p passed in.
|
int |
setRowIndexRandom(float randNbr_p)
moves the data set to a row randomly selected.
|
void |
shuffleRows()
randomize the rows in the dataset.
|
public String describe()
public int getCurrentRowIndex()
public String getDataSetID()
public boolean isAutoRewind()
public int nextRow()
public int previousRow()
public int setRowIndex(int rowNum_p)
rowNum_p
- 0-based array indexpublic int setRowIndexRandom(float randNbr_p)
public int rewind()
public List<Map<String,Object>> getDataSetRecordList()
public boolean isAtLastRow()
public boolean isAtFirstRow()
public Object getData(String fieldName_p)
fieldName_p
- name of the fieldpublic Object getData(int rowNum_p, String fieldName_p)
rowNum_p
- fieldName_p
- public int getRowCount()
public int clear()
public Map<String,Object> getCurRow()
public void shuffleRows()
public void setAutoRewind(boolean auto_p)
Copyright TestOptimal, LLC