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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDataSink(DataSink sink)
Adds a DataSink directly.void
addDataSource(T dataSource)
Adds a DataSource to this builder.void
addFileDataSinkBuilder(FileDataSinkBuilder builder)
Adds a FileDataSink for this DataSet.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.String
getId()
Gets the id of the DataSet that this will build.ScheduleParameters
getScheduleParameters()
Gets the schedule parameters that determine with the data set will record its data.boolean
isAggregate()
Gets whether or not this DataSetBuilder builds an aggregate DataSet.boolean
isScheduleAtEnd()
Gets whether or not the data should be recorded at the end of the sim.
-
-
-
Method Detail
-
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
void addDataSource(T dataSource)
Adds a DataSource to this builder. The created DataSet will use the specified data source as a source of data.- Parameters:
dataSource
-
-
defineScheduleParameters
void defineScheduleParameters(ScheduleParameters params, boolean atEnd)
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
void addFileDataSinkBuilder(FileDataSinkBuilder builder)
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
void addDataSink(DataSink sink)
Adds a DataSink directly.- Parameters:
sink
- the sink to add.
-
-