DataSet
DataSet DataSet ( void )
DataSet DataSet ( ArrayList dataRecords )
Description
Manually create a DataSet.
Parameters
- dataRecords (optional) Java ArrayList of DataRecord elements.
Return Values
Returns DataSet object.
Change Log
Version |
Description |
4.5 |
Available for all editions. |
Class Location
com.screenscraper.common.DataSet
Examples
Manually Create DataSet
// Create DataSet
myDataSet = new DataSet();
// Create DataRecord
myDataRecord = new DataRecord();
myDataRecord.put( "STATE", "AZ");
// Add DataRecord to DataSet
myDataSet.addDataRecord( myDataRecord );
Create DataSet from Array List
// Create Array List
ArrayList dataRecords = new ArrayList();
// Create DataRecord
myDataRecord = new DataRecord();
myDataRecord.put( "STATE", "AZ");
// Add DataRecord to "dataRecords" DataSet
dataRecords.add( myDataRecord );
// Create DataSet From ArrayList.
myDataSet = new DataSet( dataRecords );
See additional example usage: Iterate over DataSets & DataRecords.