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.Placement NO
    Value 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
    boolean canPlace()
    Returns whether the GTU can be placed.
    java.util.Set<DirectedLanePosition> getPosition()
    Returns the position.
    Speed getSpeed()
    Returns the speed.
    java.lang.String toString()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Placement

      public Placement​(Speed speed, java.util.Set<DirectedLanePosition> position)
      Constructor.
      Parameters:
      speed - Speed; speed
      position - Set<DirectedLanePosition>; position
  • Method Details

    • canPlace

      public boolean canPlace()
      Returns whether the GTU can be placed.
      Returns:
      whether the GTU can be placed
    • getSpeed

      public Speed getSpeed()
      Returns the speed.
      Returns:
      Speed; speed
    • getPosition

      public java.util.Set<DirectedLanePosition> getPosition()
      Returns the position.
      Returns:
      Set<DirectedLanePosition>; position
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object