|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vanetsim.map.TrafficLight
public class TrafficLight
This class represents a traffic light at a junction.
Constructor Summary | |
---|---|
TrafficLight(double redPhaseLength,
double yellowPhaseLength,
double greenPhaseLength,
Junction junction)
Constructor. |
|
TrafficLight(Junction junction)
Constructor. |
Method Summary | |
---|---|
void |
calculateTrafficLightPosition(Street tmpStreet)
Calculates Traffic light position for drawing |
void |
changePhases(int timePerStep)
This function should change the states of the traffic lights if necessary. |
double |
getGreenPhaseLength()
Gets the length of the green phase. |
double |
getRedPhaseLength()
Gets the length of the red phase. |
int |
getState()
|
Street[] |
getStreets_()
|
double |
getYellowPhaseLength()
Gets the length of the yellow phase. |
void |
setGreenPhaseLength(double greenPhaseLength)
Sets the length for the green Phase. |
void |
setRedPhaseLength(double redPhaseLength)
Sets the length of the red phase. |
void |
setState(int state)
|
void |
setStreets_(Street[] streets_)
|
void |
setYellowPhaseLength(double yellowPhaseLength)
Sets the length of the yellow phase. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrafficLight(Junction junction)
public TrafficLight(double redPhaseLength, double yellowPhaseLength, double greenPhaseLength, Junction junction)
Method Detail |
---|
public void changePhases(int timePerStep)
public void calculateTrafficLightPosition(Street tmpStreet)
public double getGreenPhaseLength()
public void setGreenPhaseLength(double greenPhaseLength)
greenPhaseLength
- the length for the green phasepublic void setYellowPhaseLength(double yellowPhaseLength)
yellowPhaseLength
- the length of the yellow phasepublic double getYellowPhaseLength()
public void setRedPhaseLength(double redPhaseLength)
redPhaseLength
- the length of the red phasepublic double getRedPhaseLength()
public void setState(int state)
state
- the state to setpublic int getState()
public Street[] getStreets_()
public void setStreets_(Street[] streets_)
streets_
- the streets_ to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |