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-2018 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.
Copyright (c) 2003-2018 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
Modifier and Type Method Description static Generator<Acceleration>makeAccelerationGenerator(Map<String,StreamInformation> streamMap, ACCELERATIONDISTTYPE accelerationDist)Parse an Acceleration distribution into a Generator for Accelerations.static Generator<Acceleration>makeDecelerationGenerator(Map<String,StreamInformation> streamMap, ACCELERATIONDISTTYPE decelerationDist)Parse an Acceleration distribution into a Generator for Decelerations (acceleration with a minus sign).static Generator<Duration>makeDurationGenerator(Map<String,StreamInformation> streamMap, DURATIONDISTTYPE durationDist)Parse a Duration distribution into a Generator for Durations.static Generator<Length>makeLengthGenerator(Map<String,StreamInformation> streamMap, LENGTHDISTTYPE lengthDist)Parse a Length distribution into a Generator for Lengths.static Generator<Position>makePositionGenerator(Map<String,StreamInformation> streamMap, POSITIONDISTTYPE positionDist)Parse a Position distribution into a Generator for Positions.static Generator<Speed>makeSpeedGenerator(Map<String,StreamInformation> streamMap, SPEEDDISTTYPE speedDist)Parse a Speed distribution into a Generator for Speeds.static Generator<Time>makeTimeGenerator(Map<String,StreamInformation> streamMap, TIMEDISTTYPE timeDist)Parse a Time distribution into a Generator for Times.
-
Method Details
-
makeLengthGenerator
public static Generator<Length> makeLengthGenerator(Map<String,StreamInformation> streamMap, LENGTHDISTTYPE lengthDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, POSITIONDISTTYPE positionDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, DURATIONDISTTYPE durationDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, TIMEDISTTYPE timeDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, SPEEDDISTTYPE speedDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, ACCELERATIONDISTTYPE accelerationDist) throws XmlParserExceptionParse 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(Map<String,StreamInformation> streamMap, ACCELERATIONDISTTYPE decelerationDist) throws XmlParserExceptionParse 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
-