Class RoadSampler.Factory

java.lang.Object
org.opentrafficsim.road.network.sampling.RoadSampler.Factory
Enclosing class:
RoadSampler

public static final class RoadSampler.Factory extends Object
Factory for RoadSampler.
  • 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

      public RoadSampler.Factory setFrequency(org.djunits.value.vdouble.scalar.Frequency frequency)
      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

      public RoadSampler create()
      Create sampler.
      Returns:
      RoadSampler; sampler