Class RoadSampler.Factory
java.lang.Object
org.opentrafficsim.road.network.sampling.RoadSampler.Factory
- Enclosing class:
- RoadSampler
Factory for
RoadSampler
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create sampler.registerExtendedDataType
(ExtendedDataType<?, ?, ?, ? super GtuDataRoad> extendedDataType) Register extended data type.registerFilterDataType
(FilterDataType<?, ? super GtuDataRoad> filterDataType) Register filter data type.setFrequency
(org.djunits.value.vdouble.scalar.Frequency frequency) Sets the frequency.
-
Constructor Details
-
Factory
Factory(RoadNetwork network) Constructor.- Parameters:
network
- RoadNetwork; network
-
-
Method Details
-
registerExtendedDataType
public RoadSampler.Factory registerExtendedDataType(ExtendedDataType<?, ?, ?, ? super GtuDataRoad> extendedDataType) Register extended data type.- Parameters:
extendedDataType
- ExtendedDataType<?, ?, ?, ? super GtuDataRoad>; extended data type- Returns:
- Factory; this factory
-
registerFilterDataType
public RoadSampler.Factory registerFilterDataType(FilterDataType<?, ? super GtuDataRoad> filterDataType) Register filter data type.- Parameters:
filterDataType
- FilterDataType<?, ? super GtuDataRoad>; filter data type- Returns:
- Factory; this factory
-
setFrequency
Sets the frequency. If no frequency is set, a sampler is created that records on move events of GTU's.- Parameters:
frequency
- Frequency; frequency- Returns:
- Factory; this factory
-
create
Create sampler.- Returns:
- RoadSampler; sampler
-