vanetsim.scenario.events
Class StopBlocking

java.lang.Object
  extended by vanetsim.scenario.events.Event
      extended by vanetsim.scenario.events.StopBlocking
All Implemented Interfaces:
java.lang.Comparable<Event>

public final class StopBlocking
extends Event

This class represents an event which ends blocking on a street ("unblock").


Constructor Summary
StopBlocking(int time, int x, int y)
          Constructor.
 
Method Summary
 int compareTo(Event other)
          Compare to another event.
 void destroy()
          Destroys itself.
 void execute()
          Execute the task.
 java.lang.String getText()
          Returns a descriptive text for display in the GUI.
 int getX()
          Gets the x coordinate.
 int getY()
          Gets the y coordinate.
 
Methods inherited from class vanetsim.scenario.events.Event
getTextColor, getTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopBlocking

public StopBlocking(int time,
                    int x,
                    int y)
             throws java.text.ParseException
Constructor.

Parameters:
time - the time in milliseconds when this event gets active
x - the x coordinate of this event
y - the y coordinate of this event
Throws:
java.text.ParseException - the parse exception
Method Detail

getX

public int getX()
Gets the x coordinate.

Returns:
the x coordinate

getY

public int getY()
Gets the y coordinate.

Returns:
the y coordinate

getText

public java.lang.String getText()
Returns a descriptive text for display in the GUI.

Specified by:
getText in class Event
Returns:
the text
See Also:
Event.getText()

compareTo

public int compareTo(Event other)
Compare to another event.

Parameters:
other - the other event
Returns:
-1 if other is larger, 1 if it's smaller and 0 if both are equal.
See Also:
Comparable.compareTo(java.lang.Object)

execute

public void execute()
Execute the task.

Specified by:
execute in class Event
See Also:
Event.execute()

destroy

public void destroy()
Destroys itself.

Specified by:
destroy in class Event
See Also:
Event.destroy()