aim4.map

## Class GridMapUtil.OnlyOneSpawnSpecGenerator

- java.lang.Object
- - aim4.map.GridMapUtil.OnlyOneSpawnSpecGenerator

- All Implemented Interfaces:
    SpawnPoint.SpawnSpecGenerator
  Enclosing class:
    GridMapUtil

      public static class GridMapUtil.OnlyOneSpawnSpecGenerator
      extends Object
      implements SpawnPoint.SpawnSpecGenerator

  The spec generator that generates just one vehicle in the entire simulation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GridMapUtil.OnlyOneSpawnSpecGenerator(int vehicleSpecId, Road destinationRoad)` Create a spec generator that generates just one vehicle in the entire simulation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<SpawnPoint.SpawnSpec>` | `act(SpawnPoint spawnPoint, double timeStep)` Advance the time step.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GridMapUtil.OnlyOneSpawnSpecGenerator

          public GridMapUtil.OnlyOneSpawnSpecGenerator(int vehicleSpecId,
                                               Road destinationRoad)

      Create a spec generator that generates just one vehicle in the entire simulation.
      Parameters:
        `vehicleSpecId` - the vehicle spec ID
        `destinationRoad` - the destination road

  - ### Method Detail

    - #### act

          public List<SpawnPoint.SpawnSpec> act(SpawnPoint spawnPoint,
                                       double timeStep)

      Advance the time step.
      Specified by:
        `act` in interface `SpawnPoint.SpawnSpecGenerator`
      Parameters:
        `spawnPoint` - the spawn point
        `timeStep` - the time step
      Returns:
        the list of spawn spec generated in this time step.

Copyright © 2013. All rights reserved.