Package repast.simphony.data2.builder
Interface DataSetBuilder<T extends DataSource>
- All Known Implementing Classes:
AggregateDataSetBuilder
,NonAggregateDataSetBuilder
public interface DataSetBuilder<T extends DataSource>
Interface for classes that can build a DataSet.
- Author:
- Nick Collier
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataSink
(DataSink sink) Adds a DataSink directly.void
addDataSource
(T dataSource) Adds a DataSource to this builder.void
Adds a FileDataSink for this DataSet.create()
Creates the DataSet.void
defineConsoleDataSink
(ConsoleDataSink.OutputStream target, String delimiter, FormatType formatType, Collection<String> sourceIds) Defines a ConsoleDataSink for this DataSet.void
defineScheduleParameters
(ScheduleParameters params, boolean atEnd) Sets the schedule parameters that determine with the data set will record its data.getId()
Gets the id of the DataSet that this will build.Gets the schedule parameters that determine with the data set will record its data.boolean
Gets whether or not this DataSetBuilder builds an aggregate DataSet.boolean
Gets whether or not the data should be recorded at the end of the sim.
-
Method Details
-
isAggregate
boolean isAggregate()Gets whether or not this DataSetBuilder builds an aggregate DataSet.- Returns:
- true if this builder builds an aggregate DataSet, otherwise false.
-
getId
String getId()Gets the id of the DataSet that this will build.- Returns:
- the id of the DataSet that this will build.
-
create
DataSet create()Creates the DataSet.- Returns:
- the created DataSet.
-
addDataSource
Adds a DataSource to this builder. The created DataSet will use the specified data source as a source of data.- Parameters:
dataSource
-
-
defineScheduleParameters
Sets the schedule parameters that determine with the data set will record its data.- Parameters:
params
-
-
getScheduleParameters
ScheduleParameters getScheduleParameters()Gets the schedule parameters that determine with the data set will record its data.- Returns:
- the schedule parameters that determine with the data set will record its data.
-
isScheduleAtEnd
boolean isScheduleAtEnd()Gets whether or not the data should be recorded at the end of the sim.- Returns:
- true if the data should be recorded at the end of the sim, otherwise false.
-
addFileDataSinkBuilder
Adds a FileDataSink for this DataSet. The data retrieved from the defined data sources will be written to the defined DataSink.- Parameters:
builder
- the FileDataSinkBuilder to add
-
defineConsoleDataSink
void defineConsoleDataSink(ConsoleDataSink.OutputStream target, String delimiter, FormatType formatType, Collection<String> sourceIds) Defines a ConsoleDataSink for this DataSet. The data retrieved from the defined data sources will be written to the defined DataSink.- Parameters:
target
- the output stream to write todelimiter
-formatType
-
-
addDataSink
Adds a DataSink directly.- Parameters:
sink
- the sink to add.
-