Class Generators
- java.lang.Object
-
- org.opentrafficsim.road.network.factory.xml.utils.Generators
-
public final class Generators extends Object
Generators based on distribution tags for typed scalars.
Copyright (c) 2003-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.- Author:
- Alexander Verbraeck
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Generator<Acceleration>makeAccelerationGenerator(StreamInformation streamMap, ACCELERATIONDISTTYPE accelerationDist)Parse an Acceleration distribution into a Generator for Accelerations.static Generator<Acceleration>makeDecelerationGenerator(StreamInformation streamMap, ACCELERATIONDISTTYPE decelerationDist)Parse an Acceleration distribution into a Generator for Decelerations (acceleration with a minus sign).static Generator<Duration>makeDurationGenerator(StreamInformation streamMap, DURATIONDISTTYPE durationDist)Parse a Duration distribution into a Generator for Durations.static Generator<Length>makeLengthGenerator(StreamInformation streamMap, LENGTHDISTTYPE lengthDist)Parse a Length distribution into a Generator for Lengths.static Generator<Position>makePositionGenerator(StreamInformation streamMap, POSITIONDISTTYPE positionDist)Parse a Position distribution into a Generator for Positions.static Generator<Speed>makeSpeedGenerator(StreamInformation streamMap, SPEEDDISTTYPE speedDist)Parse a Speed distribution into a Generator for Speeds.static Generator<Time>makeTimeGenerator(StreamInformation streamMap, TIMEDISTTYPE timeDist)Parse a Time distribution into a Generator for Times.
-
-
-
Method Detail
-
makeLengthGenerator
public static Generator<Length> makeLengthGenerator(StreamInformation streamMap, LENGTHDISTTYPE lengthDist) throws XmlParserException
Parse a Length distribution into a Generator for Lengths.- Parameters:
streamMap- the map with predefined streamslengthDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makePositionGenerator
public static Generator<Position> makePositionGenerator(StreamInformation streamMap, POSITIONDISTTYPE positionDist) throws XmlParserException
Parse a Position distribution into a Generator for Positions.- Parameters:
streamMap- the map with predefined streamspositionDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makeDurationGenerator
public static Generator<Duration> makeDurationGenerator(StreamInformation streamMap, DURATIONDISTTYPE durationDist) throws XmlParserException
Parse a Duration distribution into a Generator for Durations.- Parameters:
streamMap- the map with predefined streamsdurationDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makeTimeGenerator
public static Generator<Time> makeTimeGenerator(StreamInformation streamMap, TIMEDISTTYPE timeDist) throws XmlParserException
Parse a Time distribution into a Generator for Times.- Parameters:
streamMap- the map with predefined streamstimeDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makeSpeedGenerator
public static Generator<Speed> makeSpeedGenerator(StreamInformation streamMap, SPEEDDISTTYPE speedDist) throws XmlParserException
Parse a Speed distribution into a Generator for Speeds.- Parameters:
streamMap- the map with predefined streamsspeedDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makeAccelerationGenerator
public static Generator<Acceleration> makeAccelerationGenerator(StreamInformation streamMap, ACCELERATIONDISTTYPE accelerationDist) throws XmlParserException
Parse an Acceleration distribution into a Generator for Accelerations.- Parameters:
streamMap- the map with predefined streamsaccelerationDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
makeDecelerationGenerator
public static Generator<Acceleration> makeDecelerationGenerator(StreamInformation streamMap, ACCELERATIONDISTTYPE decelerationDist) throws XmlParserException
Parse an Acceleration distribution into a Generator for Decelerations (acceleration with a minus sign).- Parameters:
streamMap- the map with predefined streamsdecelerationDist- the tag to parse- Returns:
- the generator
- Throws:
XmlParserException- on parse error
-
-