Interface IDataset
- All Known Implementing Classes:
TabulatedDataset
public interface IDataset
Interface for classes that will contain one or more indexed objects
implementing
IRecordHolder.
Dataset's directly equivalent sources might include, e.g. directories where the contained files are the record holders to be, or a database holding tables.
- Author:
- Andy Evans
- Version: 1.0 01 Mar 2021
-
Method Summary
Modifier and Type Method Description voidaddRecordHolder(IRecordHolder recordHolder)Should add a singleRecordHolderto the end of the container.voidaddRecordHolders(ArrayList<IRecordHolder> recordHolders)Should add a collection ofIRecordHolderobjects to the end of the container.intgetEstimatedRecordCount()Should get the total records held - or to be held - in this dataset.IMetadatagetMetadata()Should get the metadata for thisIDataset.IRecordHoldergetRecordHolder(int index)Should get a singleRecordHolderat an index.ArrayList<IRecordHolder>getRecordHolders()Should get allRecordHolderobjects.voidsetEstimatedRecordCount(int estimatedRecordCount)Should set the total records held - or to be held - in this dataset.voidsetMetadata(IMetadata metadata)Should set the metadata for thisIDataset.voidsetRecordHolder(int index, IRecordHolder recordHolder)Should set a singleRecordHolderat an index.
-
Method Details
-
setMetadata
Should set the metadata for thisIDataset.- Parameters:
metadata- The metadata object for thisIDataset.
-
getMetadata
IMetadata getMetadata()Should get the metadata for thisIDataset.- Returns:
- IMetadata The metadata object for this
IDataset.
-
setEstimatedRecordCount
void setEstimatedRecordCount(int estimatedRecordCount)Should set the total records held - or to be held - in this dataset.For data streaming this may be a calculation of the estimated number of records to be held rather than the actual records, hence the name.
- Parameters:
estimatedRecordCount- Number of records or estimate.
-
getEstimatedRecordCount
int getEstimatedRecordCount()Should get the total records held - or to be held - in this dataset.For data streaming this may be a calculation of the estimated number of records to be held rather than the actual records, hence the name - it should only be used for processing progress estimations, not drawing on data. For the latter, use
getRecordHolders().getRecords().get(i).size().- Returns:
- int Number of records or estimate.
-
setRecordHolder
Should set a singleRecordHolderat an index.- Parameters:
index- Location to add RecordHolder.recordHolder- RecordHolder to add.
-
addRecordHolder
Should add a singleRecordHolderto the end of the container.- Parameters:
recordHolder- RecordHolder to add.
-
addRecordHolders
Should add a collection ofIRecordHolderobjects to the end of the container.- Parameters:
recordHolders- Record holders to add.
-
getRecordHolder
Should get a singleRecordHolderat an index.- Parameters:
index- Location of RecordHolder.- Returns:
- IRecordHolder RecordHolder requested.
-
getRecordHolders
ArrayList<IRecordHolder> getRecordHolders()Should get allRecordHolderobjects.- Returns:
- ArrayList All RecordHolder as a collection.
-