Class LaneBasedGTUGenerator.Placement
java.lang.Object
org.opentrafficsim.road.gtu.generator.LaneBasedGTUGenerator.Placement
- Enclosing class:
- LaneBasedGTUGenerator
public static final class LaneBasedGTUGenerator.Placement
extends java.lang.Object
Placement contains the information that a
RoomChecker returns.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 12 jan. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
Fields Modifier and Type Field Description static LaneBasedGTUGenerator.PlacementNOValue if the GTU cannot be placed. -
Constructor Summary
Constructors Constructor Description Placement(Speed speed, java.util.Set<DirectedLanePosition> position)Constructor. -
Method Summary
Modifier and Type Method Description booleancanPlace()Returns whether the GTU can be placed.java.util.Set<DirectedLanePosition>getPosition()Returns the position.SpeedgetSpeed()Returns the speed.java.lang.StringtoString()
-
Field Details
-
NO
Value if the GTU cannot be placed.
-
-
Constructor Details
-
Placement
Constructor.- Parameters:
speed- Speed; speedposition- Set<DirectedLanePosition>; position
-
-
Method Details
-
canPlace
public boolean canPlace()Returns whether the GTU can be placed.- Returns:
- whether the GTU can be placed
-
getSpeed
Returns the speed.- Returns:
- Speed; speed
-
getPosition
Returns the position.- Returns:
- Set<DirectedLanePosition>; position
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-