aim4.map
Interface BasicMap

All Known Implementing Classes:
GridMap

public interface BasicMap

Essentially a structured grouping of Roads and IntersectionManagers that allows a unified interface so that we can re-use certain layouts and create classes of layouts.


Method Summary
 List<DataCollectionLine> getDataCollectionLines()
          Get the list of data collection line.
 List<Road> getDestinationRoads()
          Get the Roads that exit this Layout.
 Rectangle2D getDimensions()
          Get the dimensions of this Layout, in Rectangle form.
 Registry<IntersectionManager> getImRegistry()
          Get the intersection manager registry.
 List<IntersectionManager> getIntersectionManagers()
          Get the IntersectionManagers that are part of this Layout.
 Registry<Lane> getLaneRegistry()
          Get the lane registry.
 double getMaximumSpeedLimit()
          Get the maximum speed limit of any Road in the Layout.
 Road getRoad(int laneID)
          Given a Lane ID number, get the Road of which that Lane is a part.
 Road getRoad(Lane lane)
          Given a Lane, get the Road of which that Lane is a part.
 List<Road> getRoads()
          Get the Roads that are part of this Layout.
 List<SpawnPoint> getSpawnPoints()
          Get the list of spawn points.
 void printDataCollectionLinesData(String outFileName)
          Print the data collected in data collection lines to the given file
 void setManager(int column, int row, IntersectionManager im)
          Set the intersection manager of a particular intersection.
 

Method Detail

getRoads

List<Road> getRoads()
Get the Roads that are part of this Layout.

Returns:
the Roads that are part of this Layout

getDestinationRoads

List<Road> getDestinationRoads()
Get the Roads that exit this Layout.

Returns:
the Roads exit this Layout

getDimensions

Rectangle2D getDimensions()
Get the dimensions of this Layout, in Rectangle form.

Returns:
a Rectangle representing the dimensions of this Layout

getMaximumSpeedLimit

double getMaximumSpeedLimit()
Get the maximum speed limit of any Road in the Layout.

Returns:
the maximum speed, in meters per second, of any Lane in any Road in the Layout

getImRegistry

Registry<IntersectionManager> getImRegistry()
Get the intersection manager registry.

Returns:
the intersection manager registry.

getLaneRegistry

Registry<Lane> getLaneRegistry()
Get the lane registry.

Returns:
the lane registry.

getRoad

Road getRoad(Lane lane)
Given a Lane, get the Road of which that Lane is a part.

Parameters:
lane - the Lane for which to get the enclosing Road
Returns:
the Road of which the given Lane is a part.

getRoad

Road getRoad(int laneID)
Given a Lane ID number, get the Road of which that Lane is a part.

Parameters:
laneID - the ID of the Lane for which to get the enclosing Road
Returns:
the Road of which the given Lane is a part.

getIntersectionManagers

List<IntersectionManager> getIntersectionManagers()
Get the IntersectionManagers that are part of this Layout.

Returns:
the IntersectionManagers that are part of this Layout

getDataCollectionLines

List<DataCollectionLine> getDataCollectionLines()
Get the list of data collection line.

Returns:
the data collection lines

getSpawnPoints

List<SpawnPoint> getSpawnPoints()
Get the list of spawn points.

Returns:
the lkist of spawn points

setManager

void setManager(int column,
                int row,
                IntersectionManager im)
Set the intersection manager of a particular intersection.

Parameters:
column - the column of the intersection
row - the row of the intersection
im - the intersection manager

printDataCollectionLinesData

void printDataCollectionLinesData(String outFileName)
Print the data collected in data collection lines to the given file

Parameters:
outFileName - the name of the file to which the data are outputted.


Copyright © 2011. All Rights Reserved.