Package repast.simphony.data2.builder
Class AggregateDataSetBuilder
java.lang.Object
repast.simphony.data2.builder.AbstractDataSetBuilder
repast.simphony.data2.builder.AggregateDataSetBuilder
- All Implemented Interfaces:
DataSetBuilder<AggregateDataSource>
public class AggregateDataSetBuilder
extends AbstractDataSetBuilder
implements DataSetBuilder<AggregateDataSource>
Builds datasets from a description of them.
- Author:
- Nick Collier
-
Field Summary
Fields inherited from class repast.simphony.data2.builder.AbstractDataSetBuilder
id, sinkBuilders -
Constructor Summary
ConstructorsConstructorDescriptionCreates a NonAggregateDataSetBuilder that will build a dataset with the specified id. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataSource(AggregateDataSource dataSource) Adds the specified data source to this builder.create()Creates the DataSet.voiddefineCountDataSource(String id, Class<?> objType) Defines a CountDataSource with the specified id that will return the count of objects of the specified type.voiddefineMethodDataSource(String id, AggregateOp aggType, Class<?> objType, String methodName) Defines a method data sources to be added to the data set built by this builder.booleanGets whether or not this DataSetBuilder builds an aggregate DataSet.Methods inherited from class repast.simphony.data2.builder.AbstractDataSetBuilder
addDataSink, addFileDataSinkBuilder, defineConsoleDataSink, defineScheduleParameters, getId, getScheduleParameters, isScheduleAtEndMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface repast.simphony.data2.builder.DataSetBuilder
addDataSink, addFileDataSinkBuilder, defineConsoleDataSink, defineScheduleParameters, getId, getScheduleParameters, isScheduleAtEnd
-
Constructor Details
-
AggregateDataSetBuilder
Creates a NonAggregateDataSetBuilder that will build a dataset with the specified id.- Parameters:
id- the id of the dataset to build
-
-
Method Details
-
isAggregate
public boolean isAggregate()Description copied from interface:DataSetBuilderGets whether or not this DataSetBuilder builds an aggregate DataSet.- Specified by:
isAggregatein interfaceDataSetBuilder<AggregateDataSource>- Returns:
- true if this builder builds an aggregate DataSet, otherwise false.
-
addDataSource
Adds the specified data source to this builder. The data source will be source of data for the data set created by this builder.- Specified by:
addDataSourcein interfaceDataSetBuilder<AggregateDataSource>- Parameters:
dataSource- the data source to add
-
create
Description copied from interface:DataSetBuilderCreates the DataSet.- Specified by:
createin interfaceDataSetBuilder<AggregateDataSource>- Returns:
- the created DataSet.
-
defineMethodDataSource
public void defineMethodDataSource(String id, AggregateOp aggType, Class<?> objType, String methodName) Defines a method data sources to be added to the data set built by this builder. The data source will be named by the id, and call the specified method on objects of the specified type.- Parameters:
id-objType-methodName-
-
defineCountDataSource
Defines a CountDataSource with the specified id that will return the count of objects of the specified type.- Parameters:
id-objType-
-