|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aim4.map.Road
public class Road
A group of lanes with a name.
Constructor Summary | |
---|---|
Road(String name,
BasicMap map)
Create a new Road with no Lanes. |
|
Road(String name,
List<Lane> lanes,
BasicMap map)
Create a new Road with the given Lanes, ordered from left to right. |
Method Summary | |
---|---|
void |
addTheRightMostLane(Lane lane)
Add a right most lane to this Road. |
Road |
getDual()
Get the Road that follows this Road in the opposite direction. |
Lane |
getIndexLane()
Get the leftmost Lane in this Road. |
List<Lane> |
getLanes()
Get the Lanes that make up this Road, in order from left to right. |
double |
getMaximumConnectedSpeedLimit()
Get the maximum speed limit of any connected road. |
String |
getName()
Get the name of this Road. |
boolean |
hasDual()
Whether or not this Road has a dual. |
void |
setDual(Road dual)
Set the Road that follows this Road in the opposite direction. |
String |
toString()
Get the name of this Road. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Road(String name, BasicMap map)
name
- the name of the Roadmap
- the map of which the Road is a partpublic Road(String name, List<Lane> lanes, BasicMap map)
name
- the name of the Roadlanes
- the Lanes from which to make the Roadmap
- the Layout of which the Road is a partMethod Detail |
---|
public double getMaximumConnectedSpeedLimit()
public List<Lane> getLanes()
public Lane getIndexLane()
public Road getDual()
public void setDual(Road dual)
dual
- the Road that follows this Road in the opposite directionpublic boolean hasDual()
public void addTheRightMostLane(Lane lane)
lane
- the Lane to addpublic String toString()
getName()
.
toString
in class Object
public String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |