Package repast.simphony.data2
Class RandomSeedDataSource
java.lang.Object
repast.simphony.data2.RandomSeedDataSource
- All Implemented Interfaces:
AggregateDataSource
,DataSource
,NonAggregateDataSource
public class RandomSeedDataSource
extends Object
implements AggregateDataSource, NonAggregateDataSource
DataSource that returns the current random seed.
- Author:
- Nick Collier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the data using the specified iterable.Gets data given the specified object.Gets the type of data produced by this DataSource.getId()
Gets the unique id of this DataSource.Class<?>
Gets the type of the object that this DataSource can retreive data from.void
reset()
Resets this AggregateDataSource prior to the next get call.void
Resets the random seed that this data source produces to the specified seed.
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
RandomSeedDataSource
public RandomSeedDataSource()
-
-
Method Details
-
resetSeed
Resets the random seed that this data source produces to the specified seed.- Parameters:
seed
- the new seed.
-
getId
Description copied from interface:DataSource
Gets the unique id of this DataSource. The id should be unique across the DataSet that this source is added to.- Specified by:
getId
in interfaceDataSource
- Returns:
- the unique id of this DataSource.
-
getDataType
Description copied from interface:DataSource
Gets the type of data produced by this DataSource.- Specified by:
getDataType
in interfaceDataSource
- Returns:
- the type of data produced by this DataSource.
-
get
Description copied from interface:NonAggregateDataSource
Gets data given the specified object.- Specified by:
get
in interfaceNonAggregateDataSource
- Parameters:
obj
- an object to get the data from- Returns:
- the retrieved data.
-
get
Description copied from interface:AggregateDataSource
Gets the data using the specified iterable.- Specified by:
get
in interfaceAggregateDataSource
- Parameters:
objs
- the iterable over objects to use in getting the datasize
- the number of objects in the iterable- Returns:
- the data using the specified iterable.
-
getSourceType
Description copied from interface:DataSource
Gets the type of the object that this DataSource can retreive data from.- Specified by:
getSourceType
in interfaceDataSource
- Returns:
- the type of the object that this DataSource can retreive data from.
-
reset
public void reset()Description copied from interface:AggregateDataSource
Resets this AggregateDataSource prior to the next get call.- Specified by:
reset
in interfaceAggregateDataSource
-