VANET Simulator
 All Classes Functions Variables
Public Member Functions | List of all members
vanetsim.scenario.events.StartBlocking Class Reference
Inheritance diagram for vanetsim.scenario.events.StartBlocking:
vanetsim.scenario.events.Event

Public Member Functions

 StartBlocking (int time, int x, int y, int direction, int lanes) throws ParseException
 
String getText ()
 
int compareTo (Event other)
 
void execute ()
 
void destroy ()
 
int getX ()
 
int getY ()
 
StopBlocking getStopBlockingEvent ()
 
void setStopBlockingEvent (StopBlocking event)
 
Street getStreet ()
 
int getAffectedDirection ()
 
ArrayList< BlockingObjectgetBlockingObjects ()
 
int getAffectedLanes ()
 
- Public Member Functions inherited from vanetsim.scenario.events.Event
int getTime ()
 
Color getTextColor ()
 

Additional Inherited Members

- Protected Attributes inherited from vanetsim.scenario.events.Event
int time_
 
Color color_
 

Detailed Description

This class represents an event which starts blocking on a street.

Constructor & Destructor Documentation

vanetsim.scenario.events.StartBlocking.StartBlocking ( int  time,
int  x,
int  y,
int  direction,
int  lanes 
) throws ParseException
inline

Constructor.

Parameters
timethe time in milliseconds when this event gets active
xthe x coordinate of this event
ythe y coordinate of this event
directionThe affected street direction. 0 for both directions, 1 for startNode to endNode, 1 for endNode to startNode
lanesThe amount of affected lanes (should be at least 1). Will be used for both directions. Use Integer.MAX_VALUE to use all lanes.
Exceptions
ParseExceptionan exception indicating that creation wasn't successful

Member Function Documentation

int vanetsim.scenario.events.StartBlocking.compareTo ( Event  other)
inline

Compare to another event.

Parameters
otherthe other event
Returns
-1 if other is larger, 1 if it's smaller and 0 if both are equal.
See Also
java.lang.Comparable::compareTo(java.lang.Object)
void vanetsim.scenario.events.StartBlocking.destroy ( )
inlinevirtual
void vanetsim.scenario.events.StartBlocking.execute ( )
inlinevirtual
int vanetsim.scenario.events.StartBlocking.getAffectedDirection ( )
inline

Gets the affected direction.

Returns
0 to indicate that this event is for both directions,1 that it's only from startNode to endNode, 1 that it's only from endNode to startNode
int vanetsim.scenario.events.StartBlocking.getAffectedLanes ( )
inline

Gets the amount of lanes (per direction) affected by this event.

Returns
the amount of lanes
ArrayList<BlockingObject> vanetsim.scenario.events.StartBlocking.getBlockingObjects ( )
inline

Gets the blocking objects.

Returns
the blocking objects
StopBlocking vanetsim.scenario.events.StartBlocking.getStopBlockingEvent ( )
inline

Gets the event which ends this blocking.

Returns
the event or null if this event exists forever
Street vanetsim.scenario.events.StartBlocking.getStreet ( )
inline

Gets the street where blocking is done.

Returns
the street affected by this event
String vanetsim.scenario.events.StartBlocking.getText ( )
inlinevirtual

Returns a descriptive text for display in the GUI.

Returns
the text
See Also
vanetsim.scenario.events.Event::getText()

Implements vanetsim.scenario.events.Event.

int vanetsim.scenario.events.StartBlocking.getX ( )
inline

Gets the x coordinate.

Returns
the x coordinate
int vanetsim.scenario.events.StartBlocking.getY ( )
inline

Gets the y coordinate.

Returns
the y coordinate
void vanetsim.scenario.events.StartBlocking.setStopBlockingEvent ( StopBlocking  event)
inline

Sets the event which ends this blocking.

Parameters
eventthe event which ends blocking

The documentation for this class was generated from the following file: