DataSet
DataSet DataSet ( void )
DataSet DataSet ( ArrayList dataRecords )
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 );
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 );
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.
scraper on 07/16/2010 at 5:19 pm
- Printer-friendly version
- Login or register to post comments