Class GeneratorPositions.RoadPosition.BySpeed
java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.RoadPosition.BySpeed
- All Implemented Interfaces:
GeneratorPositions.RoadPosition
- Enclosing interface:
- GeneratorPositions.RoadPosition
public static class GeneratorPositions.RoadPosition.BySpeed
extends Object
implements GeneratorPositions.RoadPosition
Road position based on desired speed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.generator.GeneratorPositions.RoadPosition
GeneratorPositions.RoadPosition.BySpeed, GeneratorPositions.RoadPosition.ByValue -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BySpeed
Constructor.- Parameters:
leftSpeed- desired speed at left side of the roadrightSpeed- desired speed at right side of the road
-
-
Method Details
-
getValue
Description copied from interface:GeneratorPositions.RoadPositionReturns the road position (0.0 = right, 1.0 = left).- Specified by:
getValuein interfaceGeneratorPositions.RoadPosition- Parameters:
desiredSpeed- desired speed at the generator- Returns:
- road position (0.0 = right, 1.0 = left)
-
hashCode
public int hashCode() -
equals
-